Rect::Rect

Rect::Rect
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);
Description

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
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 
A size whose Width and Height components set the width and height for the constructed rectangle respectively. 
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 
An enum value that initializes the rectangle to either the Min or Max rectangle value. If the value passed is Min, (x1, y1) is set to (0, 0) and the size is 0 (Size::Min). If Max is passed, (x1, y1) is set to (0, 0) and the size of the rectangle is Size::Max