Clamp clamps the local rectangle with a passed rectangle by comparing their components. The greater x1 and y1, and lesser x2 and y2 components are chosen.
Parameters |
Description |
const Rect<T> & r |
Either the value that is compared to x2 or a passed rectangle whose x1, y1, x2, and y2 components are compared to those of the local rectangle respectively. |
T l |
A value that is compared to the x1 component of the local rectangle. |
T t |
A value that is compared to the y1 component of the local rectangle. |
T b |
A value that is compared to the y2 component of the local rectangle. |
T r |
A value that is compared to the x2 component of the local rectangle. |