Rect::Offset

Rect::Offset
inline Rect<T>& Offset(T x, T y);
inline Rect<T>& Offset(const Point<T> & pt);
Description

Offset offsets the current rectangle by adding a value to each of its components. The following expression can be used to represent this result:

   (x1, y1, x2, y2) = (x1 + [x, pt.x], y1 + [y, pt.y], x2 + [x, pt.x], y2 + [y, pt.y])
Parameters
Parameters 
Description 
T x 
A value that is added to x1 and x2. 
T y 
A value that is added to y1 and y2. 
const Point<T> & pt 
A point whose x component is added to x1 and x2. 
Return Value

A Rect reference to a new string whose components are offset through the addition of alternate values.

See Also