diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2017-01-24 09:32:24 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2017-01-24 09:32:24 +0000 |
| commit | 7fecbddd1fb8b57f9c6efd3204645e33d9b38d09 (patch) | |
| tree | ce9f038347327a219b55fae5be1f6b30d91d1522 /src/sp-path.cpp | |
| parent | Remove some code and make dependant of rotate copies (diff) | |
| download | inkscape-7fecbddd1fb8b57f9c6efd3204645e33d9b38d09.tar.gz inkscape-7fecbddd1fb8b57f9c6efd3204645e33d9b38d09.zip | |
update to trunk
(bzr r15356.1.18)
Diffstat (limited to 'src/sp-path.cpp')
| -rw-r--r-- | src/sp-path.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 6c69f3463..b593b7937 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -289,23 +289,10 @@ 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; @@ -316,6 +303,18 @@ 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 @@ -355,9 +354,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->setCurveInsync(oldcurve, TRUE); - repr->setAttribute("d", value); + this->setCurve(oldcurve, TRUE); oldcurve->unref(); } } |
