diff options
| author | Jabiertxof <jtx@jtx> | 2016-12-18 23:19:40 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2016-12-18 23:19:40 +0000 |
| commit | cb31a827d3db6bc45cdd806fdf1581f608ccc180 (patch) | |
| tree | 8e786d8cb3acb1375f30d827a25867a7694b7b37 /src/live_effects/lpe-copy_rotate.cpp | |
| parent | Fix a bug on transforms in mirror symmetry (diff) | |
| download | inkscape-cb31a827d3db6bc45cdd806fdf1581f608ccc180.tar.gz inkscape-cb31a827d3db6bc45cdd806fdf1581f608ccc180.zip | |
Use Geom::Reflection instead custom method an copy rotate and mirror LPE
(bzr r15331)
Diffstat (limited to 'src/live_effects/lpe-copy_rotate.cpp')
| -rw-r--r-- | src/live_effects/lpe-copy_rotate.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp index 5b94e9083..0492b12d6 100644 --- a/src/live_effects/lpe-copy_rotate.cpp +++ b/src/live_effects/lpe-copy_rotate.cpp @@ -262,19 +262,8 @@ LPECopyRotate::setFusion(Geom::PathVector &path_on, Geom::Path divider, double s if (i%2 != 0) { Geom::Point A = (Geom::Point)origin; Geom::Point B = origin + dir * Geom::Rotate(-Geom::rad_from_deg((rotation_angle*i)+starting_angle)) * size_divider; - Geom::Translate m1(A[0], A[1]); - double hyp = Geom::distance(A, B); - double c = (B[0] - A[0]) / hyp; // cos(alpha) - double s = (B[1] - A[1]) / hyp; // sin(alpha) - - Geom::Affine m2(c, -s, s, c, 0.0, 0.0); - Geom::Scale sca(1.0, -1.0); - - Geom::Affine tmp_m = m1.inverse() * m2; - m = tmp_m; - m = m * sca; - m = m * m2.inverse(); - m = m * m1; + Geom::Line ls(A,B); + Geom::Affine m = Geom::reflection (ls.vector(), A); } else { append_path = original; } |
