diff options
| author | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-10-09 18:33:01 +0000 |
|---|---|---|
| committer | Jabiertxo Arraiza Cenoz <jtx@jtx-desktop.markerlab.es> | 2017-10-09 18:33:01 +0000 |
| commit | f318dbfe434769ab62b4f9d2971de89f1ebffc71 (patch) | |
| tree | b8a71ce927ac97ff2cd320809e7f0978213316f9 /src/sp-ellipse.cpp | |
| parent | Circle3pts LPE: handle overlapping points (diff) | |
| download | inkscape-f318dbfe434769ab62b4f9d2971de89f1ebffc71.tar.gz inkscape-f318dbfe434769ab62b4f9d2971de89f1ebffc71.zip | |
Fixes for transforms in LPE shapes
Diffstat (limited to 'src/sp-ellipse.cpp')
| -rw-r--r-- | src/sp-ellipse.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
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 <glibmm.h> #include <glibmm/i18n.h> +#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; |
