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 Rectangle structure that has None, None, None and None values set to zero.
leftGets or sets the x-coordinate of the left edge of this Rectangle structure.
topGets or sets the y-coordinate of the top edge of this Rectangle structure.
rightGets or sets the x-coordinate that is the sum of None and None property values of this Rectangle structure.
bottomGets or sets the y-coordinate that is the sum of the None and None property values of this Rectangle structure.
is_emptyGets a value indicating whether all numeric properties of this Rectangle have values of zero.
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 Rectangle structure.

See Also