diff options
| author | Jabiertxof <jtx@jtx> | 2017-02-04 11:21:15 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-02-04 11:21:15 +0000 |
| commit | e542da53d6e359cda5d1426533131ee341539412 (patch) | |
| tree | 71d4a821d1701e762a08ef8e12b9089b89e0e937 /src | |
| parent | Merge in GSoC style dialog. (Work in progress.) (diff) | |
| download | inkscape-e542da53d6e359cda5d1426533131ee341539412.tar.gz inkscape-e542da53d6e359cda5d1426533131ee341539412.zip | |
Fixes bug 1655160 in stich subpaths
Fixed bugs:
- https://launchpad.net/bugs/1655160
(bzr r15472)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-curvestitch.cpp | 12 | ||||
| -rw-r--r-- | src/live_effects/lpe-curvestitch.h | 1 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/live_effects/lpe-curvestitch.cpp b/src/live_effects/lpe-curvestitch.cpp index 38cbeaac0..f2fc00aeb 100644 --- a/src/live_effects/lpe-curvestitch.cpp +++ b/src/live_effects/lpe-curvestitch.cpp @@ -54,6 +54,7 @@ LPECurveStitch::LPECurveStitch(LivePathEffectObject *lpeobject) : prop_scale.param_set_digits(3); prop_scale.param_set_increments(0.01, 0.10); + transformed = false; } LPECurveStitch::~LPECurveStitch() @@ -106,8 +107,9 @@ LPECurveStitch::doEffect_path (Geom::PathVector const & path_in) if (!Geom::are_near(start,end)) { gdouble scaling_y = 1.0; - if (scale_y_rel.get_value()) { + if (scale_y_rel.get_value() || transformed) { scaling_y = (L2(end-start)/scaling)*prop_scale; + transformed = false; } else { scaling_y = prop_scale; } @@ -193,12 +195,8 @@ LPECurveStitch::transform_multiply(Geom::Affine const& postmul, bool set) if (postmul.isTranslation()) { strokepath.param_transform_multiply(postmul, set); } else if (!scale_y_rel.get_value()) { - // this basically means that for this transformation, the result should be the same as normal scaling the result path - // don't know how to do this yet. -// Geom::Affine new_postmul; - //new_postmul.setIdentity(); -// new_postmul.setTranslation(postmul.translation()); -// Effect::transform_multiply(new_postmul, set); + transformed = true; + strokepath.param_transform_multiply(postmul, set); } } diff --git a/src/live_effects/lpe-curvestitch.h b/src/live_effects/lpe-curvestitch.h index c6ea66f6c..0a48046e0 100644 --- a/src/live_effects/lpe-curvestitch.h +++ b/src/live_effects/lpe-curvestitch.h @@ -43,6 +43,7 @@ private: RandomParam endpoint_spacing_variation; ScalarParam prop_scale; BoolParam scale_y_rel; + bool transformed; LPECurveStitch(const LPECurveStitch&); LPECurveStitch& operator=(const LPECurveStitch&); |
