示例#1
0
 protected static IntPtr GetHalfToneBrush()
 {
     if (RopDraw._halfToneBrush == IntPtr.Zero)
     {
         Bitmap bitmap1 = new Bitmap(8, 8, PixelFormat.Format32bppArgb);
         Color  color1  = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
         Color  color2  = Color.FromArgb(0xff, 0, 0, 0);
         bool   flag1   = true;
         int    num1    = 0;
         while (num1 < 8)
         {
             int num2 = 0;
             while (num2 < 8)
             {
                 bitmap1.SetPixel(num1, num2, flag1 ? color1 : color2);
                 num2++;
                 flag1 = !flag1;
             }
             num1++;
             flag1 = !flag1;
         }
         IntPtr ptr1 = bitmap1.GetHbitmap();
         ItopVector.Core.Win32.LOGBRUSH logbrush1 = new ItopVector.Core.Win32.LOGBRUSH();
         logbrush1.lbStyle      = 3;
         logbrush1.lbHatch      = (uint)((int)ptr1);
         RopDraw._halfToneBrush = Gdi32.CreateBrushIndirect(ref logbrush1);
     }
     return(RopDraw._halfToneBrush);
 }
示例#2
0
 protected static IntPtr GetHalfToneBrush()
 {
     if (RopDraw._halfToneBrush == IntPtr.Zero)
     {
         Bitmap bitmap1 = new Bitmap(8, 8, PixelFormat.Format32bppArgb);
         Color color1 = Color.FromArgb(0xff, 0xff, 0xff, 0xff);
         Color color2 = Color.FromArgb(0xff, 0, 0, 0);
         bool flag1 = true;
         int num1 = 0;
         while (num1 < 8)
         {
             int num2 = 0;
             while (num2 < 8)
             {
                 bitmap1.SetPixel(num1, num2, flag1 ? color1 : color2);
                 num2++;
                 flag1 = !flag1;
             }
             num1++;
             flag1 = !flag1;
         }
         IntPtr ptr1 = bitmap1.GetHbitmap();
         ItopVector.Core.Win32.LOGBRUSH logbrush1 = new ItopVector.Core.Win32.LOGBRUSH();
         logbrush1.lbStyle = 3;
         logbrush1.lbHatch = (uint) ((int) ptr1);
         RopDraw._halfToneBrush = Gdi32.CreateBrushIndirect(ref logbrush1);
     }
     return RopDraw._halfToneBrush;
 }
示例#3
0
 public static extern IntPtr DeleteObject(ItopVector.Core.Win32.LOGBRUSH brush);
示例#4
0
 public static extern IntPtr CreateBrushIndirect(ref ItopVector.Core.Win32.LOGBRUSH brush);