Пример #1
0
        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));
        }
Пример #2
0
 public static short GetColorIndex(
     DxfIndexedColorSet indexedColors,
     ArgbColor color,
     out int colorDifference)
 {
     return(DxfIndexedColorSet.GetColorIndex(indexedColors.colors, color, out colorDifference));
 }
Пример #3
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)));
            }
        }
Пример #4
0
 internal new static short GetColorIndex(ArgbColor color, out int colorDifference)
 {
     return(DxfIndexedColorSet.GetColorIndex(DxfIndexedColorSet.AcadClassicIndexedColors.colors, color, out colorDifference));
 }
Пример #5
0
        public new static short GetColorIndex(ArgbColor color)
        {
            int colorDifference;

            return(DxfIndexedColorSet.GetColorIndex(color, out colorDifference));
        }