Rect¶

class
mono::geo::
Rect
¶ A Rectangle in a Cartesian coordinate system, having a size and position.
This class defines a geometric rectangle. It exists in a std. cartesian coordinate system. It is defined by its upper left corner (X,Y), and a width and height.
The rectangle cannot be rotated, its sides a parallel to the coordinate system axis.
It defines helper methods to calculate different positions and properties. You can also extract interpolation information.
Inherits from mono::geo::Point, mono::geo::Size
Public Functions

Rect
(int x, int y, int width, int height)¶ Construct a rectangle from position coordinates and size.

Rect
()¶ COnstruct an empty rectangle having position (0,0) and size (0,0)

Point
UpperLeft
() const¶ Reutrn the position of the upper left corner.
This method is the same as casting the
Rect
to aPoint
 Return
 The point of the upper left corner

Point
LowerRight
() const¶ Reutrn the position of the lower right corner.
 Return
 The point of the lower right corner

Point
UpperRight
() const¶ Reutrn the position of the upper right corner.
 Return
 The point of the upper right corner

Point
LowerLeft
() const¶ Reutrn the position of the lower left corner.
 Return
 The point of the lower left corner

class Point
Center
() const¶ Return the position of the Rectangles center.

void
setPoint
(class Point p)¶ Move (translate) the rectangle by its upper left corner.

void
setSize
(class Size s)¶ Set a new size (width/height) of the rectangle.
