示例#1
0
        public static void DrawHalftoneLine(IntPtr windowHandle, Rectangle rectangle1, Control managedBase)
        {
            IntPtr ptr1 = NativeMethods.GetDCEx(new HandleRef(managedBase, windowHandle), NativeMethods.NullHandleRef, 0x402);
            IntPtr ptr2 = TelerikPaintHelper.CreateHalftoneBrush();
            IntPtr ptr3 = NativeMethods.SelectObject(new HandleRef(managedBase, ptr1), new HandleRef(null, ptr2));

            NativeMethods.PatBlt(new HandleRef(managedBase, ptr1), rectangle1.X, rectangle1.Y, rectangle1.Width, rectangle1.Height, 0x5a0049);
            NativeMethods.SelectObject(new HandleRef(managedBase, ptr1), new HandleRef(null, ptr3));
            NativeMethods.DeleteObject(new HandleRef(null, ptr2));
            NativeMethods.ReleaseDC(new HandleRef(managedBase, windowHandle), new HandleRef(null, ptr1));
        }
示例#2
0
        public static void DrawHalftoneLine(
            IntPtr windowHandle,
            Rectangle rectangle1,
            Control managedBase)
        {
            IntPtr dcEx          = NativeMethods.GetDCEx(new HandleRef((object)managedBase, windowHandle), NativeMethods.NullHandleRef, 1026);
            IntPtr halftoneBrush = TelerikPaintHelper.CreateHalftoneBrush();
            IntPtr handle        = NativeMethods.SelectObject(new HandleRef((object)managedBase, dcEx), new HandleRef((object)null, halftoneBrush));

            NativeMethods.PatBlt(new HandleRef((object)managedBase, dcEx), rectangle1.X, rectangle1.Y, rectangle1.Width, rectangle1.Height, 5898313);
            NativeMethods.SelectObject(new HandleRef((object)managedBase, dcEx), new HandleRef((object)null, handle));
            NativeMethods.DeleteObject(new HandleRef((object)null, halftoneBrush));
            NativeMethods.ReleaseDC(new HandleRef((object)managedBase, windowHandle), new HandleRef((object)null, dcEx));
        }
示例#3
0
 public static void DrawHalftoneLine(Control canvasControl, Rectangle rectangle1)
 {
     TelerikPaintHelper.DrawHalftoneLine(canvasControl.Handle, rectangle1, canvasControl);
 }
示例#4
0
 public static void DrawHalftoneLine(Rectangle rectangle1)
 {
     TelerikPaintHelper.DrawHalftoneLine(NativeMethods.GetDesktopWindow(), rectangle1, (Control)null);
 }