public void FillRectangle(WindowsBrush brush, int x, int y, int width, int height)
        {
            HandleRef hDC    = new HandleRef(this.dc, this.dc.Hdc);
            IntPtr    hBrush = brush.HBrush;

            IntNativeMethods.RECT rect = new IntNativeMethods.RECT(x, y, x + width, y + height);
            IntUnsafeNativeMethods.FillRect(hDC, ref rect, new HandleRef(brush, hBrush));
        }
Пример #2
0
        public void FillRectangle(WindowsBrush brush, int x, int y, int width, int height)
        {
            Debug.Assert(brush != null, "brush == null");

            HandleRef hdc    = new HandleRef(dc, dc.Hdc);
            IntPtr    hBrush = brush.HBrush; // We don't delete this handle since we didn't create it.
            RECT      rect   = new RECT(x, y, x + width, y + height);

            IntUnsafeNativeMethods.FillRect(hdc, ref rect, new HandleRef(brush, hBrush));
        }