From a474159bf7130e9b46a8da1efaf32e9eac4c55b7 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Thu, 21 Sep 2017 23:12:27 +0200 Subject: Fix for bug #1715433 Clone original LPE can no longer be used to fill a powerstroke path --- src/sp-ellipse.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 30c1096ca..c2dca1fc3 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -503,6 +503,8 @@ Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform) { // Allow live effects if (hasPathEffect() && pathEffectsEnabled()) { + this->adjust_livepatheffect(xform); + this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); return xform; } -- cgit v1.2.3 From f318dbfe434769ab62b4f9d2971de89f1ebffc71 Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Mon, 9 Oct 2017 20:33:01 +0200 Subject: Fixes for transforms in LPE shapes --- src/sp-ellipse.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index c2dca1fc3..bf50128f6 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -17,6 +17,8 @@ #include #include +#include "live_effects/effect.h" + #include <2geom/angle.h> #include <2geom/circle.h> #include <2geom/ellipse.h> @@ -501,13 +503,18 @@ void SPGenericEllipse::set_shape(bool force) Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform) { - // Allow live effects - if (hasPathEffect() && pathEffectsEnabled()) { + if (hasPathEffect() && pathEffectsEnabled() && + (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) ) + { + // if path has this LPE applied, don't write the transform to the pathdata, but write it 'unoptimized' + // also if the effect is type BEND PATH to fix bug #179842 this->adjust_livepatheffect(xform); this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); return xform; } - /* Calculate ellipse start in parent coords. */ Geom::Point pos(Geom::Point(this->cx.computed, this->cy.computed) * xform); @@ -557,6 +564,9 @@ Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform) // Adjust gradient fill this->adjust_gradient(xform * ret.inverse()); + // Adjust livepatheffect + this->adjust_livepatheffect(xform); + this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); return ret; -- cgit v1.2.3 From ee527cbb228c6fba9c83bba5058d1a68ac647060 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sat, 14 Oct 2017 21:29:10 +0200 Subject: Fixing problems with nested LPE and convert to paths --- src/sp-ellipse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp-ellipse.cpp') diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index bf50128f6..166237c8e 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -505,9 +505,9 @@ Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform) { if (hasPathEffect() && pathEffectsEnabled() && (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) || - this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) || - this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) || - this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) ) + this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) ) { // if path has this LPE applied, don't write the transform to the pathdata, but write it 'unoptimized' // also if the effect is type BEND PATH to fix bug #179842 -- cgit v1.2.3