RectangleF class
Contents
[
Hide
]RectangleF class
Stores a set of four floating-point numbers that represent the location and size of a rectangle. Compatible with .NET System.Drawing.RectangleF.
Inheritance:RectangleF → Rectangle
The RectangleF type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
__init__(self, x=0.0, y=0.0, width=0.0, height=0.0) | Creates a rectangle with the specified location and size. |
Properties
| Property | Description |
|---|---|
x | Gets the x-coordinate of the upper-left corner of this rectangle. Read-only float. |
y | Gets the y-coordinate of the upper-left corner of this rectangle. Read-only float. |
width | Gets the width of this rectangle. Read-only float. |
height | Gets the height of this rectangle. Read-only float. |
left | Gets the x-coordinate of the left edge of this rectangle. Equals to x.Read-only float. |
top | Gets the y-coordinate of the top edge of this rectangle. Equals to y.Read-only float. |
right | Gets the x-coordinate that is the sum of x and width of this rectangle.Read-only float. |
bottom | Gets the y-coordinate that is the sum of y and height of this rectangle.Read-only float. |
is_empty | Specifies whether all numeric properties of this rectangle have values of zero. Read-only bool. |
Methods
| Method | Description |
|---|---|
contains(self, x, y) | Determines if the specified point is contained within this rectangle. |
contains(self, point) | Determines if the specified point is contained within this rectangle. |
contains(self, rect) | Determines if the rectangular region represented by rect is entirely contained within this rectangle. |
Remarks
Rectangles are compared by their location and size with == and can be used as dictionary keys or set members.
See Also
- class
Rectangle - module
aspose.slides - library
Aspose.Slides