Exemple #1
0
        public GDIBrush(BrushStyle aStyle, HatchStyle hatchStyle, Colorref colorref, Guid uniqueID)
            : base(true, uniqueID)
        {
            fBrushStyle = aStyle;
            fHatchStyle = hatchStyle;
            fColor = colorref;

            fLogBrush = new LOGBRUSH32();

            // Make sure to mask off the high order byte
            // or GDI will draw in black
            fLogBrush.lbColor = colorref & 0x00ffffff;
            fLogBrush.lbHatch = (int)hatchStyle;
            fLogBrush.lbStyle = (int)aStyle;

            IntPtr brushHandle = GDI32.CreateBrushIndirect(ref fLogBrush);

            SetHandle(brushHandle);
        }
Exemple #2
0
 public static extern IntPtr CreateBrushIndirect([In] ref LOGBRUSH32 plbrush);