19 lines
505 B
C++
19 lines
505 B
C++
|
#include "a2.h"
|
||
|
|
||
|
namespace freling {
|
||
|
|
||
|
std::vector<BoundingBox> A2(const std::vector<BoundingBox>& regions) {
|
||
|
std::vector<BoundingBox> updated_boxes(regions.size());
|
||
|
for (int i = 0, size = regions.size(); i < size; ++i) {
|
||
|
auto& box = updated_boxes[i];
|
||
|
const auto& region = regions[i];
|
||
|
box.x = region.x + 2;
|
||
|
box.y = region.y + 2;
|
||
|
box.width = region.width - 4;
|
||
|
box.height = region.height - 4;
|
||
|
}
|
||
|
return updated_boxes;
|
||
|
}
|
||
|
|
||
|
} // namespace freling
|