From 00b0f245b05292b755cd7520933f424e12f0ee38 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Sat, 20 Dec 2008 10:12:04 +0000 Subject: object-snapper.cpp * fix snapping to clip/mask with parent transform * replace matrix_to_desktop call sp-item.h sp-item.cpp * improve snapping to clip/mask with parent transform * remove matrix_to_desktop/matrix_from_desktop * use desktop->doc2dt() with sp_item_i2d_affine(...) desktop.h desktop.cpp * new method: dt2doc() selection-chemistry.cpp * remove awkward matrix_to_desktop(matrix_from_desktop(...)) calls (bzr r7016) --- src/selection-chemistry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index b6a194d9a..92f751e85 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1216,9 +1216,9 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, Geom::Matrix cons sp_object_read_attr (SP_OBJECT (item), "transform"); // calculate the matrix we need to apply to the clone to cancel its induced transform from its original - Geom::Matrix parent_transform = sp_item_i2doc_affine(SP_ITEM(SP_OBJECT_PARENT (item))); - Geom::Matrix t = parent_transform * matrix_to_desktop (matrix_from_desktop (affine, item), item) * parent_transform.inverse(); - Geom::Matrix t_inv =parent_transform * matrix_to_desktop (matrix_from_desktop (affine.inverse(), item), item) * parent_transform.inverse(); + Geom::Matrix parent2dt = sp_item_i2d_affine(SP_ITEM(SP_OBJECT_PARENT (item))); + Geom::Matrix t = parent2dt * affine * parent2dt.inverse(); + Geom::Matrix t_inv = t.inverse(); Geom::Matrix result = t_inv * item->transform * t; if ((prefs_parallel || prefs_unmoved) && affine.isTranslation()) { -- cgit v1.2.3