コード例 #1
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));
        }
コード例 #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));
        }