Quadrangle
Quadrangle class
Module: aspose_barcode.recognition.quadrangle
Stores a set of four Points that represent a Quadrangle region.
Constructors
| Name | Description |
|---|---|
| init | Initializes a new instance of the Quadrangle structure with the describing points. |
Methods
| Name | Return Type | Static | Description |
|---|---|---|---|
| eq | bool | No | Returns a value indicating whether this instance is equal to a specified Quadrangle value. |
| hash | int | No | Returns the hash code for the current instance. |
| str | str | No | Returns a human-readable string representation of this Quadrangle. |
| bounding_rectangle | RectLike | No | |
| contains | bool | No | |
| contains_point | bool | No | |
| contains_quadrangle | bool | No | |
| contains_rectangle | bool | No | |
| empty | Quadrangle | Yes | Represents a Quadrangle structure with its properties set to (0,0). |
| is_empty | bool | No |
Properties
| Name | Type | Description |
|---|---|---|
| left_bottom | PointLike | |
| left_top | PointLike | |
| right_bottom | PointLike | |
| right_top | PointLike |
Quadrangle Constructor
__init__(self, PointLike left_top, PointLike right_top, PointLike right_bottom, PointLike left_bottom) -> def
Initializes a new instance of the Quadrangle structure with the describing points.
| Parameter | Type | Description |
|---|---|---|
left_top | PointLike | |
right_top | PointLike | |
right_bottom | PointLike | |
left_bottom | PointLike |
Quadrangle.eq
__eq__(self, Quadrangle other) -> bool
Returns a value indicating whether this instance is equal to a specified Quadrangle value.
| Parameter | Type | Description |
|---|---|---|
other | Quadrangle |
Return Type: bool — true if obj has the same value as this instance otherwise, false.
Quadrangle.hash
__hash__(self) -> int
Returns the hash code for the current instance.
Return Type: int — A hash code for the current object.
Quadrangle.str
__str__(self) -> str
Returns a human-readable string representation of this Quadrangle.
Return Type: str — A string that represents this Quadrangle.
Quadrangle.bounding_rectangle
bounding_rectangle(self) -> RectLike
Return Type: RectLike
Quadrangle.contains
contains(self, Union[PointLike, Quadrangle, RectLike, tuple[int, int]] obj) -> bool
| Parameter | Type | Description |
|---|---|---|
obj | Union[PointLike, Quadrangle, RectLike, tuple[int, int]] |
Return Type: bool
Quadrangle.contains_point
contains_point(self, int x, int y) -> bool
| Parameter | Type | Description |
|---|---|---|
x | int | |
y | int |
Return Type: bool
Quadrangle.contains_quadrangle
contains_quadrangle(self, Quadrangle quad) -> bool
| Parameter | Type | Description |
|---|---|---|
quad | Quadrangle |
Return Type: bool
Quadrangle.contains_rectangle
contains_rectangle(self, RectLike rect) -> bool
| Parameter | Type | Description |
|---|---|---|
rect | RectLike |
Return Type: bool
Quadrangle.empty (static)
empty() -> Quadrangle
Represents a Quadrangle structure with its properties set to (0,0).
Return Type: Quadrangle
Quadrangle.is_empty
is_empty(self) -> bool
Return Type: bool
Quadrangle.left_bottom
Type: PointLike
| Parameter | Type | Description |
|---|---|---|
value | PointLike |
Quadrangle.left_top
Type: PointLike
| Parameter | Type | Description |
|---|---|---|
value | PointLike |
Quadrangle.right_bottom
Type: PointLike
| Parameter | Type | Description |
|---|---|---|
value | PointLike |
Quadrangle.right_top
Type: PointLike
| Parameter | Type | Description |
|---|---|---|
value | PointLike |