Exemplo n.º 1
0
 public static short GetColorIndex(
     DxfIndexedColorSet indexedColors,
     ArgbColor color,
     out int colorDifference)
 {
     return(DxfIndexedColorSet.GetColorIndex(indexedColors.colors, color, out colorDifference));
 }
Exemplo n.º 2
0
Arquivo: Color.cs Projeto: 15831944/WW
        public ArgbColor ToArgbColor(DxfIndexedColorSet indexedColors, byte alpha)
        {
            ArgbColor argbColor = this.ToArgbColor(indexedColors);

            argbColor.A = alpha;
            return(argbColor);
        }
Exemplo n.º 3
0
Arquivo: Color.cs Projeto: 15831944/WW
        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));
        }
Exemplo n.º 4
0
 public static DxfIndexedColorSet GetAcadIndexedColorSet(
     ArgbColor backgroundColor)
 {
     ArgbColor[] argbColorArray = (ArgbColor[])DxfIndexedColorSet.smethod_16(backgroundColor).Clone();
     DxfIndexedColor.ApplyAcadCorrection(argbColorArray, backgroundColor);
     return(new DxfIndexedColorSet(argbColorArray));
 }
Exemplo n.º 5
0
Arquivo: Color.cs Projeto: 15831944/WW
        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);
            }
        }
Exemplo n.º 6
0
Arquivo: Color.cs Projeto: 15831944/WW
        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);
            }
        }
Exemplo n.º 7
0
        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)));
            }
        }
Exemplo n.º 8
0
Arquivo: Color.cs Projeto: 15831944/WW
        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);
            }
        }
Exemplo n.º 9
0
Arquivo: Color.cs Projeto: 15831944/WW
 public System.Drawing.Color ToSystemDrawingColor(
     DxfIndexedColorSet indexedColors,
     byte alpha)
 {
     return((System.Drawing.Color) this.ToArgbColor(indexedColors, alpha));
 }
Exemplo n.º 10
0
 internal new static short GetColorIndex(ArgbColor color, out int colorDifference)
 {
     return(DxfIndexedColorSet.GetColorIndex(DxfIndexedColorSet.AcadClassicIndexedColors.colors, color, out colorDifference));
 }
Exemplo n.º 11
0
        public new static short GetColorIndex(ArgbColor color)
        {
            int colorDifference;

            return(DxfIndexedColorSet.GetColorIndex(color, out colorDifference));
        }
Exemplo n.º 12
0
 internal static ArgbColor[] smethod_18(ArgbColor backgroundColor)
 {
     return(DxfIndexedColor.smethod_6(DxfIndexedColorSet.smethod_17(backgroundColor)));
 }