summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/originalpatharray.cpp
diff options
context:
space:
mode:
authorJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-09-08 20:28:13 +0000
committerJabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es>2017-09-08 20:28:13 +0000
commit1f0a20e9f4270de3aff4b9ce0484e1d26c6d58da (patch)
treeea5e92cebc8f3b38f9e607653095b2dde24ecff9 /src/live_effects/parameter/originalpatharray.cpp
parentCI/AppVeyor: now compiles with poppler 0.59 (diff)
downloadinkscape-1f0a20e9f4270de3aff4b9ce0484e1d26c6d58da.tar.gz
inkscape-1f0a20e9f4270de3aff4b9ce0484e1d26c6d58da.zip
Fix for bug: 1715433 :: Clone original LPE can no longer be used to fill a powerstroke path
Diffstat (limited to '')
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 92859de05..2513a0d5e 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -9,6 +9,10 @@
#endif
#include "live_effects/parameter/originalpatharray.h"
+#include "live_effects/lpe-spiro.h"
+#include "live_effects/lpe-bspline.h"
+#include "live_effects/lpeobject.h"
+#include "live_effects/lpeobject-reference.h"
#include <gtkmm/widget.h>
#include <gtkmm/icontheme.h>
@@ -100,6 +104,8 @@ OriginalPathArrayParam::OriginalPathArrayParam( const Glib::ustring& label,
//_scroller.set_shadow_type(Gtk::SHADOW_IN);
oncanvas_editable = true;
+ _from_original_d = false;
+ _allow_only_bspline_spiro = false;
}
@@ -389,7 +395,27 @@ void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/
}
SPCurve *curve = NULL;
if (SP_IS_SHAPE(linked_obj)) {
- curve = SP_SHAPE(linked_obj)->getCurve();
+ SPLPEItem * lpe_item = SP_LPE_ITEM(linked_obj);
+ if (_from_original_d) {
+ curve = SP_SHAPE(linked_obj)->getCurveBeforeLPE();
+ } else if (_allow_only_bspline_spiro && lpe_item && lpe_item->hasPathEffect()){
+ curve = SP_SHAPE(linked_obj)->getCurveBeforeLPE();
+ PathEffectList lpelist = lpe_item->getEffectList();
+ PathEffectList::iterator i;
+ for (i = lpelist.begin(); i != lpelist.end(); ++i) {
+ LivePathEffectObject *lpeobj = (*i)->lpeobject;
+ if (lpeobj) {
+ Inkscape::LivePathEffect::Effect *lpe = lpeobj->get_lpe();
+ if (dynamic_cast<Inkscape::LivePathEffect::LPEBSpline *>(lpe)) {
+ LivePathEffect::sp_bspline_do_effect(curve, 0);
+ } else if (dynamic_cast<Inkscape::LivePathEffect::LPESpiro *>(lpe)) {
+ LivePathEffect::sp_spiro_do_effect(curve);
+ }
+ }
+ }
+ } else {
+ curve = SP_SHAPE(linked_obj)->getCurve();
+ }
}
if (SP_IS_TEXT(linked_obj)) {
curve = SP_TEXT(linked_obj)->getNormalizedBpath();