1 | #include <boost/polygon/polygon.hpp>
|
---|
2 |
|
---|
3 | void main()
|
---|
4 | {
|
---|
5 | double const pts[][2] = {
|
---|
6 | {-335.00000000000000, 117.87579011451453},
|
---|
7 | {334.99999999999989, 117.87579011451453},
|
---|
8 | {335.00000000000000, 335.00000000000000},
|
---|
9 | {335.00000000000000, -335.00000000000000},
|
---|
10 | {-335.00000000000000, -335.00000000000000},
|
---|
11 | {-335.00000000000000, 117.87579011451453}};
|
---|
12 |
|
---|
13 | typedef boost::polygon::polygon_with_holes_data<int> Polygon;
|
---|
14 | std::vector<Polygon::point_type> points;
|
---|
15 | for(size_t i = 0; i < 5; ++i)
|
---|
16 | points.push_back(Polygon::point_type(pts[i][0] * 1000, pts[i][1] * 1000));
|
---|
17 |
|
---|
18 | Polygon polygon;
|
---|
19 | polygon.set(points.begin(), points.end());
|
---|
20 |
|
---|
21 | typedef std::vector<Polygon> PolygonSet;
|
---|
22 | PolygonSet polygonSet;
|
---|
23 | polygonSet.push_back(polygon);
|
---|
24 |
|
---|
25 | boost::polygon::resize(polygonSet, -3000);
|
---|
26 | boost::polygon::resize(polygonSet, 5000);
|
---|
27 | }
|
---|