inline Rect(); inline Rect(NoInitType); inline explicit Rect(T val); inline Rect(const Rect<T> & rc); inline Rect(const Size<T> & sz); inline Rect(T w, T h); inline Rect(const Point<T> & tl, const Point<T> & br); inline Rect(const Point<T> & tl, const Size<T> & sz); inline Rect(T x, T y, const Size<T> & sz); inline Rect(T left, T top, T right, T bottom); inline Rect(BoundsType bt);
Rect class constructors that initialize the x1, y1, x2, and y2 components of the local Rect. When a width or height are passed into the constructors, they relate to the calculated components through the following equations:
width = (x2 - x1), and height = (y2 - y1)
Parameters |
Description |
T val |
A value that sets the same value for the width and height of the rectangle. |
const Rect<T> & rc |
A rectangle whose x1, y1, x2 and y2 components set those of the constructed rectangle. |
const Size<T> & sz | |
T w |
A value that sets the width of a rectangle whose x1 and y1 are both set to zero. |
T h |
A value that sets the height of a rectangle whose x1 and y1 are both set to zero. |
const Point<T> & tl |
A point whose x and y components set the x1 and y1 components for the constructed rectangle respectively. |
const Point<T> & br |
A point whose x and y components set the x2 and y2 components for the constructed rectangle respectively. |
T x |
A value that sets the x1 component of the constructed rectangle. |
T y |
A value that sets the y1 component of the constructed rectangle. |
T left |
A value that sets the x1 component of the constructed rectangle. |
T top |
A value that sets the y1 component of the constructed rectangle. |
T right |
A value that sets the x2 component of the constructed rectangle. |
T bottom |
A value that sets the y2 component of the constructed rectangle. |
BoundsType bt |