The operator -= function offsets a rectangle negatively (towards the top left-most corner). The following expression is used to determine the result:
(x1, y1, x2, y2) = (x1 - [value, pt.x], y1 - [val, pt.y], x2 - [val, pt.x], y2 - [val, pt.y])
Parameters |
Description |
const Point<T> & pt |
A point whose x coordinate is subtracted from x1 and x2, and whose y coordinate is subtracted from y1 and y2, in order to offset the rectangle towards the top left-most corner. |
T val |
A value that is subtracted from the x1, y1, x2, and y2 components of the rectangle in order to offset the rectangle towards the top left-most corner. |
A Rect reference to a new string whose x1, y1, x2, and y2 components are determined by offsetting its original values towards the top left-most corner.