summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
Diffstat (limited to 'src/object')
-rw-r--r--src/object/sp-ellipse.cpp9
-rw-r--r--src/object/sp-item.cpp6
-rw-r--r--src/object/sp-path.cpp16
-rw-r--r--src/object/sp-spiral.cpp9
-rw-r--r--src/object/sp-star.cpp11
5 files changed, 24 insertions, 27 deletions
diff --git a/src/object/sp-ellipse.cpp b/src/object/sp-ellipse.cpp
index a3ac66838..97bad1fdf 100644
--- a/src/object/sp-ellipse.cpp
+++ b/src/object/sp-ellipse.cpp
@@ -502,16 +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) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::POWERCLIP) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) )
+ this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL ))
{
// 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->adjust_livepatheffect(xform.inverse());
return xform;
}
/* Calculate ellipse start in parent coords. */
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index 4b5858f7e..b7cd69c7f 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -1513,12 +1513,14 @@ void SPItem::doWriteTransform(Geom::Affine const &transform, Geom::Affine const
)
{
transform_attr = this->set_transform(transform);
+ if (lpeitem && lpeitem->hasPathEffectRecursive()) {
+ lpeitem->adjust_livepatheffect(transform_attr);
+ }
if (freeze_stroke_width) {
freeze_stroke_width_recursive(false);
}
-
} else {
- if (lpeitem && lpeitem->hasPathEffectRecursive()) {
+ if (!preserve && lpeitem && lpeitem->hasPathEffectRecursive()) {
lpeitem->adjust_livepatheffect(transform_attr);
}
if (freeze_stroke_width) {
diff --git a/src/object/sp-path.cpp b/src/object/sp-path.cpp
index cf8c0ad10..d951d1738 100644
--- a/src/object/sp-path.cpp
+++ b/src/object/sp-path.cpp
@@ -326,17 +326,21 @@ 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;
+ }
+ }
+ // 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()) {
- if (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::POWERCLIP) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) )
+ if (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL))
{
// 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(transform);
return transform;
} else {
_curve_before_lpe->transform(transform);
diff --git a/src/object/sp-spiral.cpp b/src/object/sp-spiral.cpp
index ba4cc0ce5..a34e7c6d8 100644
--- a/src/object/sp-spiral.cpp
+++ b/src/object/sp-spiral.cpp
@@ -408,16 +408,13 @@ 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) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::POWERCLIP) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) )
+ this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) )
{
// 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->adjust_livepatheffect(xform.inverse());
return xform;
}
// Only set transform with proportional scaling
diff --git a/src/object/sp-star.cpp b/src/object/sp-star.cpp
index 40d38d4a8..a960d2018 100644
--- a/src/object/sp-star.cpp
+++ b/src/object/sp-star.cpp
@@ -494,23 +494,20 @@ 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) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::POWERCLIP) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_MANY) ||
- this->hasPathEffectOfType(Inkscape::LivePathEffect::FILL_BETWEEN_STROKES) ) )
+ this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL))
{
// 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->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);
+ this->adjust_livepatheffect(xform.inverse());
}
return xform;
}