| 4 | #include "qt_clust.h" |
| 5 | |
| 6 | static void include(QRect& r, const QRect& rect) |
| 7 | { |
| 8 | if (rect.left() < r.left()) { |
| 9 | r.setLeft(rect.left()); |
| 10 | } |
| 11 | if (rect.right() > r.right()) { |
| 12 | r.setRight(rect.right()); |
| 13 | } |
| 14 | if (rect.top() < r.top()) { |
| 15 | r.setTop(rect.top()); |
| 16 | } |
| 17 | if (rect.bottom() > r.bottom()) { |
| 18 | r.setBottom(rect.bottom()); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | /* |
| 23 | * A Clusterizer groups rectangles (QRects) into non-overlapping |