wijjit.layout.bounds.Bounds
- class wijjit.layout.bounds.Bounds(x, y, width, height)[source]
Represents the position and size of a UI element.
- Parameters:
- Variables:
- __init__(x, y, width, height)
Methods
__init__(x, y, width, height)contains(x, y)Check if a point is within these bounds.
intersect(other)Return the overlapping region with another bounds.
overlaps(other)Check if these bounds overlap with another bounds.
Attributes
Get the total area (width * height).
Get the bottom edge position (y + height).
Get the right edge position (x + width).
- property right: int
Get the right edge position (x + width).
- Returns:
Right edge column
- Return type:
- property bottom: int
Get the bottom edge position (y + height).
- Returns:
Bottom edge row
- Return type:
- property area: int
Get the total area (width * height).
- Returns:
Total area in characters
- Return type: