Esempio n. 1
0
        internal static DSColor FromIColor(IColor color)
        {
            if (null == color)
            {
                return(null);
            }
            ARGBColor c = color as ARGBColor;

            if (null != c)
            {
                return(c);
            }
            return(DSColor.ByARGB(color.AlphaValue, color.RedValue, color.GreenValue, color.BlueValue));
        }
Esempio n. 2
0
 /// <summary>
 /// Sets color by RGB value to this geometry.
 /// </summary>
 /// <param name="redValue">Red value for the color</param>
 /// <param name="greenValue">Green value for the color</param>
 /// <param name="blueValue">Blue value for the color</param>
 /// <returns>This geometry after color is applied</returns>
 public DSGeometry SetColor(byte redValue, byte greenValue, byte blueValue)
 {
     return(SetColor(DSColor.ByARGB(255, redValue, greenValue, blueValue)));
 }
Esempio n. 3
0
 /// <summary>
 /// Sets color by RGB value to the underlying geometry of this topology.
 /// </summary>
 /// <param name="redValue">Red value for the color</param>
 /// <param name="greenValue">Green value for the color</param>
 /// <param name="blueValue">Blue value for the color</param>
 /// <returns>This topology after color is applied</returns>
 public DSTopology SetColor(byte redVal, byte greenVal, byte blueVal)
 {
     return(SetColor(DSColor.ByARGB(255, redVal, greenVal, blueVal)));
 }