Rect
Rect
#
A 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin.
size
#
size: Size
The distance between the upper-left corner and the lower-right corner of this rectangle.
copy_with
#
copy_with(
*,
left: Number | None = None,
top: Number | None = None,
right: Number | None = None,
bottom: Number | None = None,
) -> Rect
Returns a copy of this object with the specified properties overridden.
from_center
#
Constructs a rectangle from its center point, width, and height.
The center
argument is assumed to be an offset from the origin.
from_lwth
#
Construct a rectangle from its left and top edges, its width, and its height.