Rectangle

Rectangle(int, int, int, int)

Creates a rectangle from corner coordinates and dimensions.

public Rectangle(int x, int y, int width, int height)
Parameter Type Description
x Int32 Top-left horizontal offset in pixels.
y Int32 Top-left vertical offset in pixels.
width Int32 Area width in pixels.
height Int32 Area height in pixels.

See Also


Rectangle(Point, Size)

Creates a rectangle from a top-left point and region size.

public Rectangle(Point location, Size size)
Parameter Type Description
location Point Top-left corner of the area.
size Size Width and height of the area.

See Also