Rectangle

Rectangle class

Stores a set of four integers that represent the location and size of a rectangle.

The Rectangle type exposes the following members:

Constructors

NameDescription
Rectangle(x, y, width, height)Initializes a new instance of the Rectangle class
Rectangle()Initializes a new instance of the Rectangle class

Properties

NameDescription
emptyGets a new instance of the
leftGets or sets the x-coordinate of the left edge of this
topGets or sets the y-coordinate of the top edge of this
rightGets or sets the x-coordinate that is the sum of
bottomGets or sets the y-coordinate that is the sum of the
is_emptyGets a value indicating whether all numeric properties of this
heightThe rectangle width.
widthThe rectangle height.
xThe rectangle x location.
yThe rectangle y location.

Methods

NameDescription
contains(x, y)Determines if the specified point is contained within this

See Also