![]() |
IDS peak ICV v1.1.0
|
Public Member Functions | |
| None | __init__ (self, Point point, Size size) |
| Creates a rectangle from a point and a size. | |
| Rectangle | create_from_coordinates_and_dimensions (cls, Union[int, float] x, Union[int, float] y, Union[int, float] width, Union[int, float] height) |
| Constructs a rectangle from x, y, width and height. | |
| bool | __eq__ (self, Any other) |
| Check if two rectangles are equal. | |
| bool | __ne__ (self, Any other) |
| Check if two rectangles are not equal. | |
| str | __str__ (self) |
| Get a string representation of the rectangle. | |
| str | __repr__ (self) |
| Return an unambiguous string of the Rectangle object. | |
| Point | position (self) |
| Returns the top-left corner of the rectangle. | |
| Size | size (self) |
| Returns the dimensions of the rectangle. | |
| Union[int, float] | x (self) |
| Returns the x-coordinate of the rectangle's top-left corner. | |
| Union[int, float] | y (self) |
| Returns the y-coordinate of the rectangle's top-left corner. | |
| Union[int, float] | width (self) |
| Returns the width of the rectangle. | |
| Union[int, float] | height (self) |
| Returns the height of the rectangle. | |
Protected Attributes | |
| Point | _point = point |
| Size | _size = size |
A rectangle defined by a point and a size.
Represents a rectangle composed of a position (top-left corner) and a size. The position and size types are customizable via template parameters.
Definition at line 10 of file rectangle.py.
Creates a rectangle from a point and a size.
| point | The top-left corner of the rectangle. |
| size | The dimensions of the rectangle. |
Definition at line 21 of file rectangle.py.
| bool __eq__ | ( | self, | |
| Any | other ) |
Check if two rectangles are equal.
| other | Another rectangle object OR List of coordinates [x,y,width,height] OR Tuple of coordinates (x,y,width,height) |
Definition at line 58 of file rectangle.py.
| bool __ne__ | ( | self, | |
| Any | other ) |
Check if two rectangles are not equal.
| other | Another rectangle object |
Definition at line 78 of file rectangle.py.
| str __repr__ | ( | self | ) |
Return an unambiguous string of the Rectangle object.
Definition at line 99 of file rectangle.py.
| str __str__ | ( | self | ) |
Get a string representation of the rectangle.
Definition at line 89 of file rectangle.py.
| Rectangle create_from_coordinates_and_dimensions | ( | cls, | |
| Union[int, float] | x, | ||
| Union[int, float] | y, | ||
| Union[int, float] | width, | ||
| Union[int, float] | height ) |
Constructs a rectangle from x, y, width and height.
| x | x coordinate of the upper left corner |
| y | y coordinate of the upper left corner |
| width | Width of the rectangle |
| height | Height of the rectangle |
Definition at line 39 of file rectangle.py.
| Union[int, float] height | ( | self | ) |
Returns the height of the rectangle.
Definition at line 148 of file rectangle.py.
| Point position | ( | self | ) |
Returns the top-left corner of the rectangle.
Definition at line 108 of file rectangle.py.
| Size size | ( | self | ) |
Returns the dimensions of the rectangle.
Definition at line 116 of file rectangle.py.
| Union[int, float] width | ( | self | ) |
Returns the width of the rectangle.
Definition at line 140 of file rectangle.py.
| Union[int, float] x | ( | self | ) |
Returns the x-coordinate of the rectangle's top-left corner.
Definition at line 124 of file rectangle.py.
| Union[int, float] y | ( | self | ) |
Returns the y-coordinate of the rectangle's top-left corner.
Definition at line 132 of file rectangle.py.
|
protected |
Definition at line 33 of file rectangle.py.
|
protected |
Definition at line 34 of file rectangle.py.