diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2019-06-12 17:36:26 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2019-06-12 17:36:26 +0000 |
| commit | 845d677a3bd7a39320e32b6c53fa70963a92ba87 (patch) | |
| tree | 0ddee54aa21e0e3122388b3e57fbb5602debacfd /src/ui/dialog/align-and-distribute.cpp | |
| parent | Refactor: convert rotate_rel() to a method. (diff) | |
| download | inkscape-845d677a3bd7a39320e32b6c53fa70963a92ba87.tar.gz inkscape-845d677a3bd7a39320e32b6c53fa70963a92ba87.zip | |
Refactoring: replace funcs with methods.
I hereby disclaim any implicit or explicit ownership of my changes in this
changeset, and put them under a multiple licence consisting of your choice of
one of more of:
- The CC0 / Public Domain - https://creativecommons.org/choose/zero/ .
- The MIT / Expat license - https://en.wikipedia.org/wiki/MIT_License
- The default licence of your project
- The https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License - version
2.1 or higher
- The https://en.wikipedia.org/wiki/GNU_General_Public_License - version 2 or
higher
- Any licence in the 2018-Aug-27 popular licenses list of
https://opensource.org/licenses
- The https://en.wikipedia.org/wiki/Apache_License version 2.0 or later
- The https://en.wikipedia.org/wiki/Artistic_License version 2.0 or later
- The https://en.wikipedia.org/wiki/ISC_license
- The https://opensource.org/licenses/BSD-2-Clause
Crediting me will be nice, but not mandatory, and you can change the licence
of the project without needing my permission.
Diffstat (limited to 'src/ui/dialog/align-and-distribute.cpp')
| -rw-r--r-- | src/ui/dialog/align-and-distribute.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index a714b96f6..135584932 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -201,7 +201,7 @@ void ActionAlign::do_action(SPDesktop *desktop, int index) a.sy0 * b->min()[Geom::Y] + a.sy1 * b->max()[Geom::Y]); Geom::Point const mp_rel( mp - sp ); if (LInfty(mp_rel) > 1e-9) { - sp_item_move_rel(item, Geom::Translate(mp_rel)); + item->move_rel(Geom::Translate(mp_rel)); changed = true; } } @@ -359,7 +359,7 @@ private : if (!Geom::are_near(pos, it->bbox.min()[_orientation], 1e-6)) { Geom::Point t(0.0, 0.0); t[_orientation] = pos - it->bbox.min()[_orientation]; - sp_item_move_rel(it->item, Geom::Translate(t)); + it->item->move_rel(Geom::Translate(t)); changed = true; } pos += it->bbox[_orientation].extent(); @@ -384,7 +384,7 @@ private : Geom::Point t(0.0, 0.0); t[_orientation] = pos - it.anchor; //translate - sp_item_move_rel(it.item, Geom::Translate(t)); + it.item->move_rel(Geom::Translate(t)); changed = true; } } @@ -626,7 +626,7 @@ private : { Geom::Point p2 = item->getCenter(); Geom::Point delta = p1 - p2; - sp_item_move_rel(item,Geom::Translate(delta[Geom::X],delta[Geom::Y] )); + item->move_rel(Geom::Translate(delta[Geom::X],delta[Geom::Y] )); p1 = p2; } @@ -729,7 +729,7 @@ private : g_random_double_range (0, (*_dialog.randomize_bbox)[Geom::Y].extent() - (*item_box)[Geom::Y].extent()); // displacement is the new center minus old: Geom::Point t = Geom::Point (x, y) - 0.5*(item_box->max() + item_box->min()); - sp_item_move_rel(item, Geom::Translate(t)); + item->move_rel(Geom::Translate(t)); } } @@ -825,7 +825,7 @@ private : Geom::Point base = sorted[i]._base; Geom::Point t(0.0, 0.0); t[_orientation] = b_min[_orientation] + step * i - base[_orientation]; - sp_item_move_rel(item, Geom::Translate(t)); + item->move_rel(Geom::Translate(t)); changed = true; } @@ -888,7 +888,7 @@ private : Geom::Point base = *pt * (item)->i2dt_affine(); Geom::Point t(0.0, 0.0); t[_orientation] = ref_point[_orientation] - base[_orientation]; - sp_item_move_rel(item, Geom::Translate(t)); + item->move_rel(Geom::Translate(t)); changed = true; } } |
