diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2019-06-12 16:01:28 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2019-06-12 16:01:28 +0000 |
| commit | f724d2d99d2195dea3049bfe580b6b6f5386c7b6 (patch) | |
| tree | 7b7ae06ef2f6f16436790e5da14402ec34e1c552 /src/object/sp-item-transform.cpp | |
| parent | Update comments to match reality. (diff) | |
| download | inkscape-f724d2d99d2195dea3049bfe580b6b6f5386c7b6.tar.gz inkscape-f724d2d99d2195dea3049bfe580b6b6f5386c7b6.zip | |
Refactor: convert rotate_rel() to a method.
Diffstat (limited to 'src/object/sp-item-transform.cpp')
| -rw-r--r-- | src/object/sp-item-transform.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/object/sp-item-transform.cpp b/src/object/sp-item-transform.cpp index 2806931c0..4fbe0bcc5 100644 --- a/src/object/sp-item-transform.cpp +++ b/src/object/sp-item-transform.cpp @@ -21,24 +21,6 @@ #include <glib.h> -void sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation) -{ - Geom::Point center = item->getCenter(); - Geom::Translate const s(item->getCenter()); - Geom::Affine affine = Geom::Affine(s).inverse() * Geom::Affine(rotation) * Geom::Affine(s); - - // Rotate item. - item->set_i2d_affine(item->i2dt_affine() * (Geom::Affine)affine); - // Use each item's own transform writer, consistent with sp_selection_apply_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_scale_rel(SPItem *item, Geom::Scale const &scale) { Geom::OptRect bbox = item->desktopVisualBounds(); |
