internal static Color FromIColor(IColor color) { if (null == color) { return(null); } ARGBColor c = color as ARGBColor; if (null != c) { return(c); } return(Color.ByARGB(color.AlphaValue, color.RedValue, color.GreenValue, color.BlueValue)); }
/// <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 Geometry SetColor(byte redValue, byte greenValue, byte blueValue) { return(SetColor(Color.ByARGB(255, redValue, greenValue, blueValue))); }
/// <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 Topology SetColor(byte redVal, byte greenVal, byte blueVal) { return(SetColor(Color.ByARGB(255, redVal, greenVal, blueVal))); }