Rectangle class
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
| Constructor | Description | 
|---|---|
| init | Initializes a new instance of the Rectanglestructure with the specified location and size. | 
| init | Initializes a new instance of the Rectanglestructure with the specified location and size. | 
| init | Constructs a new instance of Rectangle | 
Properties
| Property | Description | 
|---|---|
| empty | Gets a new instance of the Rectanglestructure that hasRectangle.x,Rectangle.y,Rectangle.widthandRectangle.heightvalues set to zero. | 
| location | Gets or sets the coordinates of the upper-left corner of this Rectanglestructure. | 
| size | Gets or sets the size of this Rectangle. | 
| x | Gets or sets the x-coordinate of the upper-left corner of this Rectanglestructure. | 
| y | Gets or sets the y-coordinate of the upper-left corner of this Rectanglestructure. | 
| width | Gets or sets the width of this Rectanglestructure. | 
| height | Gets or sets the height of this Rectanglestructure. | 
| left | Gets or sets the x-coordinate of the left edge of this Rectanglestructure. | 
| top | Gets or sets the y-coordinate of the top edge of this Rectanglestructure. | 
| right | Gets or sets the x-coordinate that is the sum of Rectangle.xandRectangle.widthproperty values of thisRectanglestructure. | 
| bottom | Gets or sets the y-coordinate that is the sum of the Rectangle.yandRectangle.heightproperty values of thisRectanglestructure. | 
| is_empty | Gets a value indicating whether all numeric properties of this Rectanglehave values of zero. | 
Methods
| Method | Description | 
|---|---|
| inflate | Creates and returns an inflated copy of the specified Rectanglestructure. The copy is inflated by the specified amount. The originalRectanglestructure remains unmodified. | 
| inflate | Inflates this Rectangleby the specified amount. | 
| inflate | Inflates this Rectangleby the specified amount. | 
| intersect | Returns a third Rectanglestructure that represents the intersection of two otherRectanglestructures. If there is no intersection, an emptyRectangleis returned. | 
| intersect | Replaces this Rectanglewith the intersection of itself and the specifiedRectangle. | 
| contains | Determines if the specified point is contained within this Rectanglestructure. | 
| contains | Determines if the specified point is contained within this Rectanglestructure. | 
| contains | Determines if the rectangular region represented by rectis entirely contained within thisRectanglestructure. | 
| offset | Adjusts the location of this rectangle by the specified amount. | 
| offset | Adjusts the location of this rectangle by the specified amount. | 
| from_points | Creates a new Rectanglefrom two points specified. Two verticales of the createdRectanglewill be equal to the passedpoint1andpoint2. These would be typically the opposite vertices. | 
| ceiling | Converts the specified RectangleFstructure to aRectanglestructure by rounding theRectangleFvalues to the next higher integer values. | 
| truncate | Converts the specified RectangleFto aRectangleby truncating theRectangleFvalues. | 
| round | Converts the specified RectangleFto aRectangleby rounding theRectangleFvalues to the nearest integer values. | 
| union | Gets a Rectanglestructure that contains the union of twoRectanglestructures. | 
| from_left_top_right_bottom | Creates a Rectanglestructure with the specified edge locations. | 
| intersects_with | Determines if this rectangle intersects with rect. | 
| normalize | Normalizes the rectangle by making it’s width and height positive, left less than right and top less than bottom. | 
See Also
- module aspose.cad
- class Rectangle
- class RectangleF