Returns the intersection rectangle between this and rc rectangles.
| 321 | |
| 322 | // Returns the intersection rectangle between this and rc rectangles. |
| 323 | [[nodiscard]] |
| 324 | RectT createIntersection(const RectT& rc) const |
| 325 | { |
| 326 | if (intersects(rc)) |
| 327 | return RectT(PointT<T>(x > rc.x ? x : rc.x, y > rc.y ? y : rc.y), |
| 328 | PointT<T>(x + w < rc.x + rc.w ? x + w : rc.x + rc.w, |
| 329 | y + h < rc.y + rc.h ? y + h : rc.y + rc.h)); |
| 330 | return RectT(); |
| 331 | } |
| 332 | |
| 333 | const RectT& operator+=(const BorderT<T>& br) |
| 334 | { |