Пример #1
0
        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;
        }
Пример #2
0
 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;
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 Topology SetColorCore(Color color)
 {
     this.Color = color;
     return this;
 }
Пример #5
0
        /// <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;
        }
Пример #6
0
 /// <summary>
 /// Sets color to entity/geometry
 /// </summary>
 /// <param name="color">Color value</param>
 public Topology SetColor(Color color)
 {
     return SetColorCore(color);
 }