public static short GetColorIndex( DxfIndexedColorSet indexedColors, ArgbColor color, out int colorDifference) { return(DxfIndexedColorSet.GetColorIndex(indexedColors.colors, color, out colorDifference)); }
public ArgbColor ToArgbColor(DxfIndexedColorSet indexedColors, byte alpha) { ArgbColor argbColor = this.ToArgbColor(indexedColors); argbColor.A = alpha; return(argbColor); }
public static Color CreateFrom(ArgbColor color) { int colorDifference; short colorIndex = DxfIndexedColorSet.GetColorIndex(color, out colorDifference); return(colorDifference != 0 ? Color.CreateFromRgb(color.Argb) : Color.CreateFromColorIndex(colorIndex)); }
public static DxfIndexedColorSet GetAcadIndexedColorSet( ArgbColor backgroundColor) { ArgbColor[] argbColorArray = (ArgbColor[])DxfIndexedColorSet.smethod_16(backgroundColor).Clone(); DxfIndexedColor.ApplyAcadCorrection(argbColorArray, backgroundColor); return(new DxfIndexedColorSet(argbColorArray)); }
public int ToArgb(DxfIndexedColorSet indexedColors) { switch (this.ColorType) { case ColorType.ByColor: return((int)this.uint_1 & 16777215 | -16777216); case ColorType.ByColorIndex: return(indexedColors[(int)this.ColorIndex].Argb); default: return(-16777216); } }
public ArgbColor ToArgbColor(DxfIndexedColorSet indexedColors) { switch (this.ColorType) { case ColorType.ByColor: return(new ArgbColor((int)this.uint_1 & 16777215 | -16777216)); case ColorType.ByColorIndex: return(indexedColors[(int)this.ColorIndex]); default: return(ArgbColors.Black); } }
internal static short smethod_14(Color color) { switch (color.ColorType) { case ColorType.ByLayer: return(256); case ColorType.ByBlock: return(0); case ColorType.None: return(257); default: return(DxfIndexedColorSet.GetColorIndex(color.ToArgbColor(DxfIndexedColorSet.AcadClassicIndexedColors))); } }
public int ToArgb(DxfIndexedColorSet indexedColors, byte alpha) { if (alpha == byte.MaxValue) { return(this.ToArgb()); } switch (this.ColorType) { case ColorType.ByColor: return((int)this.uint_1 & 16777215 | (int)alpha << 24); case ColorType.ByColorIndex: return((int)((long)indexedColors[(int)this.ColorIndex].Argb & 16777215L | (long)((uint)alpha << 24))); default: return((int)alpha << 24); } }
public System.Drawing.Color ToSystemDrawingColor( DxfIndexedColorSet indexedColors, byte alpha) { return((System.Drawing.Color) this.ToArgbColor(indexedColors, alpha)); }
internal new static short GetColorIndex(ArgbColor color, out int colorDifference) { return(DxfIndexedColorSet.GetColorIndex(DxfIndexedColorSet.AcadClassicIndexedColors.colors, color, out colorDifference)); }
public new static short GetColorIndex(ArgbColor color) { int colorDifference; return(DxfIndexedColorSet.GetColorIndex(color, out colorDifference)); }
internal static ArgbColor[] smethod_18(ArgbColor backgroundColor) { return(DxfIndexedColor.smethod_6(DxfIndexedColorSet.smethod_17(backgroundColor))); }