diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-11-18 17:59:18 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-11-18 17:59:18 +0000 |
| commit | 88b914c8f65f78e31ae591bc00f09cf3192f502d (patch) | |
| tree | 11ab5570843379d38d89f8612c6530220cafb9fb /src | |
| parent | Another fix for the status bar with mesh gradients. (diff) | |
| download | inkscape-88b914c8f65f78e31ae591bc00f09cf3192f502d.tar.gz inkscape-88b914c8f65f78e31ae591bc00f09cf3192f502d.zip | |
Fix #1627817. Bug in knot LPE
Fixed bugs:
- https://launchpad.net/bugs/1627817
(bzr r15259)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-knot.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index fbc32cf3e..474523aa3 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -26,6 +26,7 @@ #include <2geom/sbasis-to-bezier.h> #include <2geom/bezier-to-sbasis.h> #include <2geom/basic-intersection.h> +#include "helper/geom.h" // for change crossing undo #include "verbs.h" @@ -392,14 +393,14 @@ LPEKnot::doEffect_path (Geom::PathVector const &path_in) if (gpaths.size()==0){ return path_in; } - - for (unsigned comp=0; comp<path_in.size(); comp++){ + Geom::PathVector const original_pathv = pathv_to_linear_and_cubic_beziers(path_in); + for (unsigned comp=0; comp<original_pathv.size(); comp++){ //find the relevant path component in gpaths (required to allow groups!) //Q: do we always receive the group members in the same order? can we rest on that? unsigned i0 = 0; for (i0=0; i0<gpaths.size(); i0++){ - if (path_in[comp]==gpaths[i0]) break; + if (original_pathv[comp]==gpaths[i0]) break; } if (i0 == gpaths.size() ) {THROW_EXCEPTION("lpe-knot error: group member not recognized");}// this should not happen... @@ -514,7 +515,7 @@ collectPathsAndWidths (SPLPEItem const *lpeitem, Geom::PathVector &paths, std::v c = SP_SHAPE(lpeitem)->getCurve(); } if (c) { - Geom::PathVector subpaths = c->get_pathvector(); + Geom::PathVector subpaths = pathv_to_linear_and_cubic_beziers(c->get_pathvector()); for (unsigned i=0; i<subpaths.size(); i++){ paths.push_back(subpaths[i]); //FIXME: do we have to be more carefull when trying to access stroke width? |
