예제 #1
0
 public static short GetColorIndex(
     DxfIndexedColorSet indexedColors,
     ArgbColor color,
     out int colorDifference)
 {
     return(DxfIndexedColorSet.GetColorIndex(indexedColors.colors, color, out colorDifference));
 }
예제 #2
0
파일: Color.cs 프로젝트: 15831944/WW
        public ArgbColor ToArgbColor(DxfIndexedColorSet indexedColors, byte alpha)
        {
            ArgbColor argbColor = this.ToArgbColor(indexedColors);

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

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