| 22 | { |
| 23 | |
| 24 | inline rectangle bounding_box_of_rects ( |
| 25 | const std::vector<std::pair<unsigned int, rectangle> >& rects, |
| 26 | const point& position |
| 27 | ) |
| 28 | /*! |
| 29 | ensures |
| 30 | - returns the smallest rectangle that contains all the |
| 31 | rectangles in rects. That is, returns the rectangle that |
| 32 | contains translate_rect(rects[i].second,position) for all valid i. |
| 33 | !*/ |
| 34 | { |
| 35 | rectangle rect; |
| 36 | |
| 37 | for (unsigned long i = 0; i < rects.size(); ++i) |
| 38 | { |
| 39 | rect += translate_rect(rects[i].second,position); |
| 40 | } |
| 41 | |
| 42 | return rect; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | // ---------------------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected