Public Member Functions | |
| __init__ (self, Union[int, float] width, Union[int, float] height) | |
| Size constructor from width and height. | |
| bool | __eq__ (self, Any other) |
| Check if two Size objects are equal. | |
| bool | __ne__ (self, Any other) |
| Check if two Size objects are not equal. | |
| str | __str__ (self) |
| Returns a string representation of the Size object. | |
| str | __repr__ (self) |
| Return an unambiguous string of the Size object. | |
| Union[int, float] | width (self) |
| Get the width of the size. | |
| Union[int, float] | height (self) |
| Get the height of the size. | |
| Size | transposed (self) |
Data Fields | |
| width = 2: | |
| height | |
Protected Attributes | |
| Union[int, float] | _width = width |
| Union[int, float] | _height = height |
A size consists of width and height where width and height have to be greater than or equal to zero.
| __init__ | ( | self, | |
| Union[int, float] | width, | ||
| Union[int, float] | height ) |
Size constructor from width and height.
| width | Width of the size. |
| height | Height of the size. |
| OutOfRangeException | If width or height is less than zero. |
| bool __eq__ | ( | self, | |
| Any | other ) |
| bool __ne__ | ( | self, | |
| Any | other ) |
| str __repr__ | ( | self | ) |
Return an unambiguous string of the Size object.
| str __str__ | ( | self | ) |
| Union[int, float] height | ( | self | ) |
Get the height of the size.
| Size transposed | ( | self | ) |
| Union[int, float] width | ( | self | ) |
Get the width of the size.
|
protected |
|
protected |
| height |
| width = 2: |