System.Drawing.Graphics.FillRectangle Method

Fills the interior of a rectangle specified by a pair of coordinates, a width, and a height.

Syntax

public void FillRectangle (Brush brush, int x, int y, int width, int height)

Parameters

brush
System.Drawing.Brush that determines the characteristics of the fill.
x
The x-coordinate of the upper-left corner of the rectangle to fill.
y
The y-coordinate of the upper-left corner of the rectangle to fill.
width
Width of the rectangle to fill.
height
Height of the rectangle to fill.

Remarks

This method fills the interior of the rectangle defined by the x, y, width, and height parameters, including the specified upper-left corner and up to the calculated lower and bottom edges.

Requirements

Namespace: System.Drawing
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0