public override drawing::Brush GetPaint( Color color ) { DeviceGrayColor spaceColor = (DeviceGrayColor)color; int g = (int)Math.Round(spaceColor.G * 255); return(new drawing::SolidBrush( drawing::Color.FromArgb(g, g, g) )); }
/** * <summary>Gets the color corresponding to the specified components.</summary> * <param name="components">Color components to convert.</param> */ public static DeviceColor Get( PdfArray components ) { if (components == null) { return(null); } switch (components.Count) { case 1: return(DeviceGrayColor.Get(components)); case 3: return(DeviceRGBColor.Get(components)); case 4: return(DeviceCMYKColor.Get(components)); default: return(null); } }
public SetDeviceGrayStrokeColor( DeviceGrayColor value ) : base(OperatorKeyword, value) { }