The operator |= function determines the intersection of two rectangles by comparing their components and selecting the left-most x1, top-most y1, right-most x2, and bottom-most y2. The following expression is used to determine the result:
(x1, y1, x2, y2) = (min(x1, r.x1), min(y1, r.y1), max(x2, r.x2), max(y2, r.y2)
Parameters |
Description |
const Rect<T> & r |
A passed rectangle whose components are compared to those of a local rectangle in order to determine union. |
A Rect reference to a new string whose components are altered to represent the union of its original components with those of a passed rectangle.