private bool CheckEquals(Color color) { if (color == null) return false; return color.AlphaValue == this.AlphaValue && color.RedValue == this.RedValue && color.GreenValue == this.GreenValue && color.BlueValue == this.BlueValue; }
private static Color ByARGB(byte alpha, byte red, byte green, byte blue, string name) { Color clr = new Color(alpha, red, green, blue); clr.Name = name; return clr; }
/// <summary> /// /// </summary> /// <param name="alpha"></param> /// <param name="red"></param> /// <param name="green"></param> /// <param name="blue"></param> /// <returns></returns> public static Color ByARGB(byte alpha, byte red, byte green, byte blue) { Color clr = new Color(alpha, red, green, blue); return clr; }
Topology SetColorCore(Color color) { this.Color = color; return this; }
/// <summary> /// Extracts the underlying geometry from the topology and makes it /// persistent. /// </summary> /// <param name="color">Color to be assigned to extracted geometry.</param> /// <returns>Geometry</returns> public Geometry _ExtractGeometry(Color color) { Geometry geom = this.Geometry; if (null != geom) { mAutoDispose = false; //someone else is taking control geom.Persist(); if (null != color) geom.Color = color; } return geom; }
/// <summary> /// Sets color to entity/geometry /// </summary> /// <param name="color">Color value</param> public Topology SetColor(Color color) { return SetColorCore(color); }