diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-01 14:02:26 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-01 14:02:26 +0000 |
| commit | 57132e1d5f4729e2ea1abc2ef835f3962f6680b4 (patch) | |
| tree | 369c9d944697c466c99a549b9456a805e0d47d76 /src/sp-path.cpp | |
| parent | Update to trunk (diff) | |
| parent | Update to trunk (diff) | |
| download | inkscape-57132e1d5f4729e2ea1abc2ef835f3962f6680b4.tar.gz inkscape-57132e1d5f4729e2ea1abc2ef835f3962f6680b4.zip | |
merge mirror improvements
(bzr r15295.1.41)
Diffstat (limited to 'src/sp-path.cpp')
| -rw-r--r-- | src/sp-path.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp index b593b7937..6c69f3463 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -289,10 +289,23 @@ Geom::Affine SPPath::set_transform(Geom::Affine const &transform) { if (!_curve) { // 0 nodes, nothing to transform return Geom::identity(); } + // Adjust stroke + this->adjust_stroke(transform.descrim()); + + // Adjust pattern fill + this->adjust_pattern(transform); + + // Adjust gradient fill + this->adjust_gradient(transform); + + // Adjust LPE + this->adjust_livepatheffect(transform); // 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)) { + if (this->hasPathEffectOfType(Inkscape::LivePathEffect::CLONE_ORIGINAL) || + this->hasPathEffectOfType(Inkscape::LivePathEffect::BEND_PATH)) + { // if path has the CLONE_ORIGINAL 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 return transform; @@ -303,18 +316,6 @@ Geom::Affine SPPath::set_transform(Geom::Affine const &transform) { _curve->transform(transform); } - // Adjust stroke - this->adjust_stroke(transform.descrim()); - - // Adjust pattern fill - this->adjust_pattern(transform); - - // Adjust gradient fill - this->adjust_gradient(transform); - - // Adjust LPE - this->adjust_livepatheffect(transform); - this->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG); // nothing remains - we've written all of the transform, so return identity @@ -354,9 +355,9 @@ g_message("sp_path_update_patheffect writes 'd' attribute"); if (gchar const * value = repr->attribute("d")) { Geom::PathVector pv = sp_svg_read_pathv(value); SPCurve *oldcurve = new SPCurve(pv); - if (oldcurve) { - this->setCurve(oldcurve, TRUE); + this->setCurveInsync(oldcurve, TRUE); + repr->setAttribute("d", value); oldcurve->unref(); } } |
