diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-09-24 10:21:14 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-09-24 10:21:14 +0000 |
| commit | 47dfdcc650d9faaec121088fac69aa69d54299c3 (patch) | |
| tree | f2df26416b3040279252c4c69f3053ed3b5c0a6e /src | |
| parent | Typo fix for name var (diff) | |
| download | inkscape-47dfdcc650d9faaec121088fac69aa69d54299c3.tar.gz inkscape-47dfdcc650d9faaec121088fac69aa69d54299c3.zip | |
Fix bug 1627202 on mirror symmetry wrong results on transforms
Fixed bugs:
- https://launchpad.net/bugs/1627202
(bzr r15127)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-mirror_symmetry.cpp | 14 | ||||
| -rw-r--r-- | src/live_effects/lpe-mirror_symmetry.h | 1 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/live_effects/lpe-mirror_symmetry.cpp b/src/live_effects/lpe-mirror_symmetry.cpp index afb7e2230..fc13415fd 100644 --- a/src/live_effects/lpe-mirror_symmetry.cpp +++ b/src/live_effects/lpe-mirror_symmetry.cpp @@ -87,7 +87,7 @@ void LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem) { using namespace Geom; - + original_bbox(lpeitem); Point point_a(boundingbox_X.max(), boundingbox_Y.min()); Point point_b(boundingbox_X.max(), boundingbox_Y.max()); Point point_c(boundingbox_X.max(), boundingbox_Y.middle()); @@ -145,6 +145,18 @@ LPEMirrorSymmetry::doBeforeEffect (SPLPEItem const* lpeitem) } void +LPEMirrorSymmetry::transform_multiply(Geom::Affine const& postmul, bool set) +{ + center_point *= postmul; + previous_center = center_point; + // cycle through all parameters. Most parameters will not need transformation, but path and point params do. + for (std::vector<Parameter *>::iterator it = param_vector.begin(); it != param_vector.end(); ++it) { + Parameter * param = *it; + param->param_transform_multiply(postmul, set); + } +} + +void LPEMirrorSymmetry::doOnApply (SPLPEItem const* lpeitem) { using namespace Geom; diff --git a/src/live_effects/lpe-mirror_symmetry.h b/src/live_effects/lpe-mirror_symmetry.h index 9e5b4d628..7ec4029e0 100644 --- a/src/live_effects/lpe-mirror_symmetry.h +++ b/src/live_effects/lpe-mirror_symmetry.h @@ -46,6 +46,7 @@ public: virtual ~LPEMirrorSymmetry(); virtual void doOnApply (SPLPEItem const* lpeitem); virtual void doBeforeEffect (SPLPEItem const* lpeitem); + virtual void transform_multiply(Geom::Affine const& postmul, bool set); virtual Geom::PathVector doEffect_path (Geom::PathVector const & path_in); /* the knotholder entity classes must be declared friends */ friend class MS::KnotHolderEntityCenterMirrorSymmetry; |
