Rect (gb.clipper2)
This class represents a rectangle with integer coordinates.
Static methods
Stretch
Stretch a rectangle so that it fits inside a target rectangle frame while keeping its proportions, and return the geometry of the final rectangle.
Properties
Bottom
Return or set the position of the bottom border of the rectangle.
H
Return or set the height of the rectangle.
Height
Return or set the height of the rectangle.
Left
Return or set the position of the left border of the rectangle.
Right
Return or set position of the right border of the rectangle.
Top
Return or set the position of the top border of the rectangle.
W
Return or set the width of the rectangle.
Width
Return or set the width of the rectangle.
X
Return or set the X coordinate of the rectangle.
Y
Return or set the Y coordinate of the rectangle.
Methods
Center
Return the center of the rectangle.
Clear
Clear the rectangle, i.e. make it void.
Contains
Return if the specified point is included in the rectangle.
Copy
Return a copy of the rectangle.
Expand
Expand the rectangle with the specified distances.
Intersection
Return the intersection between the rectangle and
Rect.
IsVoid
Return if the rectangle is void.
Move
Move and optionally resize the rectangle.
Shrink
Shrink the rectangle with the specified distances.
Union
Return the bounding rectangle of the current rectangle and
Rect.