summaryrefslogtreecommitdiffstats
path: root/src/object/sp-item-transform.cpp
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2019-06-12 17:36:26 +0000
committerShlomi Fish <shlomif@shlomifish.org>2019-06-12 17:36:26 +0000
commit845d677a3bd7a39320e32b6c53fa70963a92ba87 (patch)
tree0ddee54aa21e0e3122388b3e57fbb5602debacfd /src/object/sp-item-transform.cpp
parentRefactor: convert rotate_rel() to a method. (diff)
downloadinkscape-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/object/sp-item-transform.cpp')
-rw-r--r--src/object/sp-item-transform.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/object/sp-item-transform.cpp b/src/object/sp-item-transform.cpp
index 4fbe0bcc5..e01571ef4 100644
--- a/src/object/sp-item-transform.cpp
+++ b/src/object/sp-item-transform.cpp
@@ -21,41 +21,6 @@
#include <glib.h>
-void sp_item_scale_rel(SPItem *item, Geom::Scale const &scale)
-{
- Geom::OptRect bbox = item->desktopVisualBounds();
- if (bbox) {
- Geom::Translate const s(bbox->midpoint()); // use getCenter?
- item->set_i2d_affine(item->i2dt_affine() * s.inverse() * scale * s);
- item->doWriteTransform(item->transform);
- }
-}
-
-void sp_item_skew_rel(SPItem *item, double skewX, double skewY)
-{
- Geom::Point center = item->getCenter();
- Geom::Translate const s(item->getCenter());
-
- Geom::Affine const skew(1, skewY, skewX, 1, 0, 0);
- Geom::Affine affine = Geom::Affine(s).inverse() * skew * Geom::Affine(s);
-
- item->set_i2d_affine(item->i2dt_affine() * affine);
- item->doWriteTransform(item->transform);
-
- // Restore the center position (it's changed because the bbox center changed)
- if (item->isCenterSet()) {
- item->setCenter(center * affine);
- item->updateRepr();
- }
-}
-
-void sp_item_move_rel(SPItem *item, Geom::Translate const &tr)
-{
- item->set_i2d_affine(item->i2dt_affine() * tr);
-
- item->doWriteTransform(item->transform);
-}
-
/**
* Calculate the affine transformation required to transform one visual bounding box into another, accounting for a uniform strokewidth.
*