The operator - function negates the rectangle by turning each of its components negative. The following expression is used to determine the result:
(result.x1, result.y1, result.x2, result.y2) = (-r.x1, -r.y1, -r.x2, -r.y2)
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. |
r |
A rectangle whose x1, y1, x2, and y2 components are negated. |
A new Rect whose x1,y1, x2 and y2 components are determined by negating those of a passed rectangle.