Glade Reference
A Rect class is used to represent a rectangle comprising two coordinate pairs. Note that this is NOT the same as a rectangle object which is a database object instead.
Creates a Rect object r. The rectangle coordinates are set to invalid i.e. llx = +infinity, urx = -infinity etc.
Creates a Rect object r and initialises it with Point types ll, ur.
Creates a Rect object and initialises its coordinates.
Get the specified Rect coordinate.
Set the specified Rect coordinate.
Get the lower left or upper right Rect coordinates as Points.
Set the Rect to invalid, i.e. llx = +infinity, urx = -infinity etc.
Scale a Rect coordinates by dividing them by s.
Offset (transpose) a Rect by the specified x and y coordinates. The Rect r is modified.
Set a Rect's width. The lower left remains the same.
Get the width of a Rect.
Set the height of a Rect. The lower left remains the same.
Get the height of a Rect.
Get the centre point of a Rect.
Returns True is the rectangle is square, False if it is not.
Transforms a Rect using Point p and orientation orient.
Swaps the X and Y coordinates of a Rect.
Rect r is set to the union of the Rects r and p, i.e. the bounding box of both.
Rect r is set to the union of itself and Point p, i.e. the bounding box of both.
Returns True if the Rect touches or overlaps the point x, y; returns False otherwise.
Returns True if the Rect touches or overlaps the rectangle formed by xlo, ylo, xhi, yhi; returns False otherwise.
Returns True if the Rect touches or overlaps the Rect p; returns False otherwise.
Returns True if the Rect touches the point x, y; returns False otherwise.
Returns True if the Rect touches the rectangle formed by xlo, ylo, xhi, yhi; returns False otherwise.
bool b = r.touch(Rect p)
Returns True if the Rect touches the Rect p; returns False otherwise.
Returns True if the Rect overlaps the point x, y; returns False otherwise.
Returns True if the Rect overlaps the rectangle formed by xlo, ylo, xhi, yhi; returns False otherwise.
Returns True if the Rect overlaps the Rect p; returns False otherwise.
Returns True if the Rect contains the point x, y; returns False otherwise.
Returns True if the Rect contains the rectangle formed by xlo, ylo, xhi, yhi; returns False otherwise.
Returns True if the Rect contains the Rect p; returns False otherwise.
Modifies Rect r to the intersection of itself and Rect p.
Rect s = r.intersectsWith(Rect p)
Returns a rectangle which is the intersection of r and p.
Copyright © Peardrop Design 2020.