Rect::SetRect

Rect::SetRect
inline void SetRect(T l, T t, T r, T b);
inline void SetRect(const Size<T> & sz);
inline void SetRect(T w, T h);
inline void SetRect(const Rect<T> & rc);
inline void SetRect(const Point<T> & tl, const Point<T> & br);
inline void SetRect(T x, T y, const Size<T> & sz);
inline void SetRect(const Point<T> & tl, const Size<T> & sz);
inline void SetRect(BoundsType bt);
Description

SetRect initializes the x1, y1, x2, and y2 components of the current rectangle. The following expression can be used to represent this result:

   (x1, y1, x2, y2) = ([l, 0, rc.x1, t1.x, x, hr.First], [t, 0, rc.y1, t1.y, y, vr.First], [r, sz.Width, w, rc.x2, br.x, x + sz.Width, hr.Last], [b, sz.Height, h, rc.y2, br.y, y + sz.Height, vr.Last])
Parameters
Parameters 
Description 
T l 
A value that sets x1 component of the rectangle. 
T t 
A value that sets y1 component of the rectangle. 
T r 
A value that sets x2 component of the rectangle. 
T b 
A value that sets y2 component of the rectangle. 
const Size<T> & sz 
A size whose width component sets x2 (x + sz.Width) and whose Height component sets y2 (y + sz.Height). 
T w 
A value used to set the rectangle's width and thus its x2 (x2 = w). 
T h 
A value used to set the rectangle's height and thus its y2 (y2 = h). 
const Rect<T> & rc 
A rectangle whose components set those of the local rectangle. 
const Point<T> & tl 
A point whose x component sets x1 and whose y component sets y1 component of the rectangle.. 
const Point<T> & br 
A point whose x component sets x2 and whose y component sets y2 components of the rectangle. 
T x 
A value that sets x1 component of the rectangle. 
T y 
A value that sets y1 component of the 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
hr 
A range whose First component sets x1 and whose Last component sets x2 components of the rectangle. 
vr 
A range whose First component sets y1 and whose Last component sets y2 components of the rectangle.