Stores a set of four Points that represent a Quadrangle region.
More...
Inherits _MwWrapper.
|
| def | __init__ (self, PointLike left_top, PointLike right_top, PointLike right_bottom, PointLike left_bottom) |
| | Initializes a new instance of the Quadrangle structure with the describing points. More...
|
| |
| bool | __eq__ (self, Quadrangle other) |
| | Returns a value indicating whether this instance is equal to a specified Quadrangle value. More...
|
| |
| int | __hash__ (self) |
| | Returns the hash code for the current instance. More...
|
| |
| str | __str__ (self) |
| | Returns a human-readable string representation of this Quadrangle. More...
|
| |
| RectLike | bounding_rectangle (self) |
| |
| bool | contains (self, Union[PointLike, Quadrangle, RectLike, tuple[int, int]] obj) |
| |
| bool | contains_point (self, int x, int y) |
| |
| bool | contains_quadrangle (self, Quadrangle quad) |
| |
| bool | contains_rectangle (self, RectLike rect) |
| |
| bool | is_empty (self) |
| |
| PointLike | left_bottom (self) |
| |
| None | left_bottom (self, PointLike value) |
| |
| PointLike | left_top (self) |
| |
| None | left_top (self, PointLike value) |
| |
| PointLike | right_bottom (self) |
| |
| None | right_bottom (self, PointLike value) |
| |
| PointLike | right_top (self) |
| |
| None | right_top (self, PointLike value) |
| |
Stores a set of four Points that represent a Quadrangle region.
◆ __init__()
| def __init__ |
( |
|
self, |
|
|
PointLike |
left_top, |
|
|
PointLike |
right_top, |
|
|
PointLike |
right_bottom, |
|
|
PointLike |
left_bottom |
|
) |
| |
Initializes a new instance of the Quadrangle structure with the describing points.
- Parameters
-
| left_top A Point that represents the left-top corner of the Quadrangle. |
| rightTop A Point that represents the right-top corner of the Quadrangle. |
| rightBottom A Point that represents the right-bottom corner of the Quadrangle. |
| leftBottom A Point that represents the left-bottom corner of the Quadrangle. |
◆ __eq__()
Returns a value indicating whether this instance is equal to a specified Quadrangle value.
- Parameters
-
| other A Quadrangle value to compare to this instance. |
- Returns
- : true if obj has the same value as this instance otherwise, false.
◆ __hash__()
Returns the hash code for the current instance.
- Returns
- A hash code for the current object.
◆ __str__()
Returns a human-readable string representation of this Quadrangle.
- Returns
- : A string that represents this Quadrangle.
◆ bounding_rectangle()
| RectLike bounding_rectangle |
( |
|
self | ) |
|
Rectangle bounding this Quadrangle.
◆ contains()
| bool contains |
( |
|
self, |
|
|
Union[PointLike, Quadrangle, RectLike, tuple[int, int]] |
obj |
|
) |
| |
Check if a Point, Quadrangle, Rectangle, or (x, y) tuple is contained in this Quadrangle.
◆ contains_point()
| bool contains_point |
( |
|
self, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
◆ contains_quadrangle()
| bool contains_quadrangle |
( |
|
self, |
|
|
Quadrangle |
quad |
|
) |
| |
◆ contains_rectangle()
| bool contains_rectangle |
( |
|
self, |
|
|
RectLike |
rect |
|
) |
| |
◆ empty()
Represents a Quadrangle structure with its properties set to (0,0).
◆ is_empty()
Tests whether all Points of this Quadrangle have values of zero.
◆ left_bottom() [1/2]
| PointLike left_bottom |
( |
|
self | ) |
|
Gets left-bottom corner Point of Quadrangle region.
◆ left_bottom() [2/2]
| None left_bottom |
( |
|
self, |
|
|
PointLike |
value |
|
) |
| |
Sets left-bottom corner Point of Quadrangle region.
◆ left_top() [1/2]
| PointLike left_top |
( |
|
self | ) |
|
Gets left-top corner Point of Quadrangle region.
◆ left_top() [2/2]
| None left_top |
( |
|
self, |
|
|
PointLike |
value |
|
) |
| |
Sets left-top corner Point of Quadrangle region.
◆ right_bottom() [1/2]
| PointLike right_bottom |
( |
|
self | ) |
|
Gets right-bottom corner Point of Quadrangle region.
◆ right_bottom() [2/2]
| None right_bottom |
( |
|
self, |
|
|
PointLike |
value |
|
) |
| |
Sets right-bottom corner Point of Quadrangle region.
◆ right_top() [1/2]
| PointLike right_top |
( |
|
self | ) |
|
Gets right-top corner Point of Quadrangle region.
◆ right_top() [2/2]
| None right_top |
( |
|
self, |
|
|
PointLike |
value |
|
) |
| |
Sets right-top corner Point of Quadrangle region.