diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
| commit | d2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch) | |
| tree | e2703384779e83312c456399999997fcc289c5cf /src/sp-star.cpp | |
| parent | Merge branch 'master' into powerpencil (diff) | |
| parent | change assignment to equality (diff) | |
| download | inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip | |
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/sp-star.cpp')
| -rw-r--r-- | src/sp-star.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/sp-star.cpp b/src/sp-star.cpp index d7ee352c7..9844df98a 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -20,7 +20,7 @@ #include <cstring> #include <string> #include <glib.h> -#include <glibmm/i18n.h> +#include "live_effects/effect.h" #include "svg/svg.h" #include "attributes.h" @@ -29,6 +29,7 @@ #include "document.h" #include "sp-star.h" +#include <glibmm/i18n.h> SPStar::SPStar() : SPPolygon() , sides(5), @@ -511,13 +512,26 @@ void SPStar::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:: Geom::Affine SPStar::set_transform(Geom::Affine const &xform) { bool opt_trans = (randomized == 0); - // Only set transform with proportional scaling - if (!xform.withoutTranslation().isUniformScale()) { + // Allow live effects + if (hasPathEffect() && pathEffectsEnabled() && + (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) || + 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' + this->adjust_livepatheffect(xform); + this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); return xform; } - // Allow live effects - if (hasPathEffect() && pathEffectsEnabled()) { + // Only set transform with proportional scaling + if (!xform.withoutTranslation().isUniformScale()) { + // Adjust livepatheffect + if (hasPathEffect() && pathEffectsEnabled()) { + this->adjust_livepatheffect(xform); + this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); + } return xform; } @@ -558,6 +572,9 @@ Geom::Affine SPStar::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; |
