diff options
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/sp-ellipse.cpp | 11 | ||||
| -rwxr-xr-x | src/object/sp-lpe-item.cpp | 1 | ||||
| -rw-r--r-- | src/object/sp-path.cpp | 16 | ||||
| -rw-r--r-- | src/object/sp-spiral.cpp | 14 | ||||
| -rw-r--r-- | src/object/sp-star.cpp | 14 |
5 files changed, 13 insertions, 43 deletions
diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp index 97bad1fdf..08be94f6f 100644 --- a/src/object/sp-ellipse.cpp +++ b/src/object/sp-ellipse.cpp @@ -502,15 +502,13 @@ void SPGenericEllipse::set_shape() Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform) { - // TODO: try to remove CLONE_ORIGINAL from here - if (hasPathEffect() && pathEffectsEnabled() && - this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL )) + if (hasPathEffect() && pathEffectsEnabled()) { - // 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 + // Inverse it to compensate this->adjust_livepatheffect(xform.inverse()); return xform; } + /* Calculate ellipse start in parent coords. */ Geom::Point pos(Geom::Point(this->cx.computed, this->cy.computed) * xform); @@ -559,9 +557,6 @@ Geom::Affine SPGenericEllipse::set_transform(Geom::Affine const &xform) // Adjust gradient fill this->adjust_gradient(xform * ret.inverse()); - - // Adjust livepatheffect - this->adjust_livepatheffect(xform); return ret; } diff --git a/src/object/sp-lpe-item.cpp b/src/object/sp-lpe-item.cpp index d543c5c4c..d11249d1f 100755 --- a/src/object/sp-lpe-item.cpp +++ b/src/object/sp-lpe-item.cpp @@ -187,7 +187,6 @@ Inkscape::XML::Node* SPLPEItem::write(Inkscape::XML::Document *xml_doc, Inkscape return repr; } - /** * returns true when LPE was successful. */ diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp index d951d1738..558b3b72e 100644 --- a/src/object/sp-path.cpp +++ b/src/object/sp-path.cpp @@ -326,14 +326,13 @@ Geom::Affine SPPath::set_transform(Geom::Affine const &transform) { if (!_curve) { // 0 nodes, nothing to transform return Geom::identity(); } - // Only set transform with proportional scaling - if (!transform.withoutTranslation().isUniformScale()) { - // Adjust livepatheffect - if (hasPathEffect() && pathEffectsEnabled()) { - this->adjust_livepatheffect(transform.inverse()); - return transform; - } + if (hasPathEffect() && pathEffectsEnabled()) + { + // Inverse it to compensate + this->adjust_livepatheffect(transform.inverse()); + return transform; } + // TODO: try to remove CLONE_ORIGINAL from here // Transform the original-d path if this is a valid LPE this, other else the (ordinary) path if (_curve_before_lpe && hasPathEffectRecursive()) { @@ -358,9 +357,6 @@ Geom::Affine SPPath::set_transform(Geom::Affine const &transform) { // Adjust gradient fill this->adjust_gradient(transform); - // Adjust LPE - this->adjust_livepatheffect(transform); - // nothing remains - we've written all of the transform, so return identity return Geom::identity(); } diff --git a/src/object/sp-spiral.cpp b/src/object/sp-spiral.cpp index a34e7c6d8..83455dbe4 100644 --- a/src/object/sp-spiral.cpp +++ b/src/object/sp-spiral.cpp @@ -408,21 +408,14 @@ void SPSpiral::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape */ Geom::Affine SPSpiral::set_transform(Geom::Affine const &xform) { - // TODO: try to remove CLONE_ORIGINAL from here - if (hasPathEffect() && pathEffectsEnabled() && - this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) ) + if (hasPathEffect() && pathEffectsEnabled()) { - // 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 + // Inverse it to compensate this->adjust_livepatheffect(xform.inverse()); return xform; } // Only set transform with proportional scaling if (!xform.withoutTranslation().isUniformScale()) { - // Adjust livepatheffect - if (hasPathEffect() && pathEffectsEnabled()) { - this->adjust_livepatheffect(xform); - } return xform; } @@ -463,9 +456,6 @@ Geom::Affine SPSpiral::set_transform(Geom::Affine const &xform) // Adjust gradient fill this->adjust_gradient(xform * ret.inverse()); - // Adjust livepatheffect - this->adjust_livepatheffect(xform); - return ret; } diff --git a/src/object/sp-star.cpp b/src/object/sp-star.cpp index a960d2018..b0c9a8197 100644 --- a/src/object/sp-star.cpp +++ b/src/object/sp-star.cpp @@ -494,21 +494,14 @@ void SPStar::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape:: Geom::Affine SPStar::set_transform(Geom::Affine const &xform) { bool opt_trans = (randomized == 0); - // TODO: try to remove CLONE_ORIGINAL from here - if (hasPathEffect() && pathEffectsEnabled() && - this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL)) + if (hasPathEffect() && pathEffectsEnabled()) { - // 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 + // Inverse it to compensate this->adjust_livepatheffect(xform.inverse()); return xform; } // Only set transform with proportional scaling if (!xform.withoutTranslation().isUniformScale()) { - // Adjust livepatheffect - if (hasPathEffect() && pathEffectsEnabled()) { - this->adjust_livepatheffect(xform.inverse()); - } return xform; } @@ -549,9 +542,6 @@ Geom::Affine SPStar::set_transform(Geom::Affine const &xform) // Adjust gradient fill this->adjust_gradient(xform * ret.inverse()); - // Adjust livepatheffect - this->adjust_livepatheffect(xform); - return ret; } |
