示例#1
0
        public Color GetNearestColor(Color color)
        {
            HandleRef hdc         = new HandleRef(null, dc.Hdc);
            int       colorResult = IntUnsafeNativeMethods.GetNearestColor(hdc, ColorTranslator.ToWin32(color));

            return(ColorTranslator.FromWin32(colorResult));
        }
        public Color GetNearestColor(Color color)
        {
            HandleRef hDC = new HandleRef(null, this.dc.Hdc);

            return(ColorTranslator.FromWin32(IntUnsafeNativeMethods.GetNearestColor(hDC, ColorTranslator.ToWin32(color))));
        }