Rect::+

Rect::+
inline const Rect<T> operator +(const Point<T> & pt) const;
inline const Rect<T> operator +(T val) const;
Description

The operator + function offsets a rectangle positively (towards the bottom right-most corner). The following expression is used to determine the result:

  (result.x1, result.y1, result.x2, result.y2) = (r.x1 + [val, pt.x], r.y1 + [val, pt.y], r.x2 + [val, pt.x], r.y2 + [val, pt.y])
Parameters
Parameters 
Description 
const Point<T> & pt 
A point whose x coordinate is added to x1 and x2, and whose y coordinate is added to y1 and y2, in order to offset the rectangle towards the bottom right-most corner. 
T val 
A value that is added to the x1, y1, x2, and y2 components of the rectangle in order to offset the rectangle towards the bottom right-most corner. 
Return Value

A new Rect whose x1, y1, x2, and y2 components are determined by offsetting those of a passed Rect.