public Path AddRectangle(
RectangleF rectangle
)Public Function AddRectangle (
rectangle As RectangleF
) As Pathpublic:
Path^ AddRectangle(
RectangleF rectangle
)member AddRectangle :
rectangle : RectangleF -> Path The rectangle is added as a new closed figure.
When filling a rectangle (with identity transformation), the Width and Height properties specify the size of the rectangle in pixels (Right and Bottom are exclusive).
When drawing a rectangle (with identity transformation), the Right and Bottom values are inclusive. If the width of the Pen is 1, a rectangle with zero width and height will be rendered as a single pixel.
The rectangle parameter is not validated here but in the moment of drawing the coordinates of the possibly transformed path points must fall into the bounds of an int value; otherwise, an OverflowException will be thrown.