Point::Offset

Point::Offset
inline Point<T>& Offset(const Point<T> & pt);
inline Point<T>& Offset(const Size<T> & sz);
inline Point<T>& Offset(T val);
inline Point<T>& Offset(T x2, T y2);
Description

Offset offsets the point by adding alternate values to its x and y coordinate values. The following expression is used to determine the result:

   (pt1.x, pt1.y) = (pt1.x + [val, pt2.x, x2], pt1.y + [val, pt2.y, y2])

A call to the Offset function is equivalent to calling the += operator.

Parameters
Parameters 
Description 
const Point<T> & pt 
A point whose x and y coordinates are added to the x and y coordinates of the original point respectively. 
const Size<T> & sz 
Size whose width and height values are used to offset the point. The width variable is added to the x coordinate value, and the height is added to the y coordinate value. 
T val 
A fixed value added to both the x and y coordinate values of the current point. 
T x2 
Variable whose value is added to the x coordinate of the current point. 
T y2 
Variable whose value is added to the y coordinate of the current point. 
Return Value

A Point reference to the value whose coordinates result from the addition of a fixed value (number or another Point) to the original coordinates.