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 |
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. |
A Rect reference to a new string whose components are offset through the addition of alternate values.