/// <summary> /// Fills the rect. /// </summary> /// <param name="color">The color.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> public void FillRect(Color color, int x, int y, int width, int height) { GDIBrush b = new GDIBrush(color); FillRect(b, x, y, width, height); b.Dispose(); }
/// <summary> /// Clears the specified color. /// </summary> /// <param name="color">The color.</param> public void Clear(Color color) { GDIBrush b = new GDIBrush(color); Clear(b); b.Dispose(); }
/// <summary> /// Fills the rect. /// </summary> /// <param name="brush">The brush.</param> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> public void FillRect(GDIBrush brush, int x, int y, int width, int height) { RECTAPI gr; gr.Top = y; gr.Left = x; gr.Right = width + x; gr.Bottom = height + y; NativeUser32Api.FillRect(mhDC, ref gr, brush.hBrush); }
/// <summary> /// Clears the specified brush. /// </summary> /// <param name="brush">The brush.</param> public void Clear(GDIBrush brush) { FillRect(brush, 0, 0, mWidth, mHeight); }