Graphics.FillRectangle

FillRectangle(Brush, float, float, float, float)

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

public void FillRectangle(Brush brush, float x, float y, float width, float height)
ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
xSingleThe x-coordinate of the upper-left corner of the rectangle to fill.
ySingleThe y-coordinate of the upper-left corner of the rectangle to fill.
widthSingleWidth of the rectangle to fill.
heightSingleHeight of the rectangle to fill.

See Also


FillRectangle(Brush, RectangleF)

Fills the interior of a rectangle specified by a RectangleF structure.

public void FillRectangle(Brush brush, RectangleF rect)
ParameterTypeDescription
brushBrushBrush that determines the characteristics of the fill.
rectRectangleFRectangleF structure that represents the rectangle to fill.

See Also