diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-07-24 23:26:11 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-07-24 23:26:11 +0000 |
| commit | 7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5 (patch) | |
| tree | 48cae26bf789b11d79f72efc16a6676f960eaaa6 /src/conn-avoid-ref.cpp | |
| parent | update to trunk (diff) | |
| parent | 3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff) | |
| download | inkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.tar.gz inkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.zip | |
update to trunk
(bzr r12588.1.45)
Diffstat (limited to 'src/conn-avoid-ref.cpp')
| -rw-r--r-- | src/conn-avoid-ref.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index c13b9a5d3..ec9aba793 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -19,7 +19,7 @@ #include "display/curve.h" #include "2geom/line.h" #include "2geom/crossing.h" -#include "2geom/convex-cover.h" +#include "2geom/convex-hull.h" #include "helper/geom-curves.h" #include "svg/stringstream.h" #include "conn-avoid-ref.h" @@ -252,8 +252,9 @@ static std::vector<Geom::Point> approxItemWithPoints(SPItem const *item, const G { SPGroup* group = SP_GROUP(item); // consider all first-order children - for (GSList const* i = sp_item_group_item_list(group); i != NULL; i = i->next) { - SPItem* child_item = SP_ITEM(i->data); + std::vector<SPItem*> itemlist = sp_item_group_item_list(group); + for (std::vector<SPItem*>::const_iterator i = itemlist.begin(); i != itemlist.end(); i++) { + SPItem* child_item = *i; std::vector<Geom::Point> child_points = approxItemWithPoints(child_item, item_transform * child_item->transform); poly_points.insert(poly_points.end(), child_points.begin(), child_points.end()); } @@ -296,7 +297,7 @@ static Avoid::Polygon avoid_item_poly(SPItem const *item) Geom::Line prev_parallel_hull_edge; prev_parallel_hull_edge.setOrigin(hull_edge.origin()+hull_edge.versor().ccw()*spacing); prev_parallel_hull_edge.setVersor(hull_edge.versor()); - int hull_size = hull.boundary.size(); + int hull_size = hull.size(); for (int i = 0; i < hull_size; ++i) { hull_edge.setPoints(hull[i], hull[i+1]); |
