FillRectangle

Graphics.FillRectangle method (1 of 4)

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

public void FillRectangle(Brush brush, Rectangle rect)
Parameter Type Description
brush Brush Brush that determines the characteristics of the fill.
rect Rectangle Rectangle structure that represents the rectangle to fill.

Exceptions

exception condition
ArgumentNullException brush is null.

See Also


Graphics.FillRectangle method (2 of 4)

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

public void FillRectangle(Brush brush, RectangleF rect)
Parameter Type Description
brush Brush Brush that determines the characteristics of the fill.
rect RectangleF RectangleF structure that represents the rectangle to fill.

Exceptions

exception condition
ArgumentNullException brush is null.

See Also


Graphics.FillRectangle method (3 of 4)

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)
Parameter Type Description
brush Brush Brush that determines the characteristics of the fill.
x Single The x-coordinate of the upper-left corner of the rectangle to fill.
y Single The y-coordinate of the upper-left corner of the rectangle to fill.
width Single Width of the rectangle to fill.
height Single Height of the rectangle to fill.

Exceptions

exception condition
ArgumentNullException brush is null.

See Also


Graphics.FillRectangle method (4 of 4)

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

public void FillRectangle(Brush brush, int x, int y, int width, int height)
Parameter Type Description
brush Brush Brush that determines the characteristics of the fill.
x Int32 The x-coordinate of the upper-left corner of the rectangle to fill.
y Int32 The y-coordinate of the upper-left corner of the rectangle to fill.
width Int32 Width of the rectangle to fill.
height Int32 Height of the rectangle to fill.

Exceptions

exception condition
ArgumentNullException brush is null.

See Also