From 4fc3975983c401a7fb95084ab2db10d609e36f05 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Tue, 16 Dec 2008 15:52:36 +0000 Subject: * remove sp_item_i2root_affine and sp_item_i2r_affine and replace all calls by sp_item_i2doc_affine or sp_item_i2d_affine respectively * remove sp_root_bbox, root->c2p was considered in the wrong place there * in sp_item_i2doc_affine do not consider SP_ITEM(object)->transform for root node, because node does not have a transform attribute * fix style scaling for boolean operations (with viewBox) * fix zoom to fit drawing (with viewBox) * fix export area size for "export drawing" (with viewBox) * fix simultaneous movement of clone + original (with viewBox) (bzr r7010) --- 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 4e93c4832..b6a194d9a 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1216,7 +1216,7 @@ 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_i2root_affine(SP_ITEM(SP_OBJECT_PARENT (item))); + 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 result = t_inv * item->transform * t; @@ -2229,7 +2229,7 @@ sp_selection_tile(SPDesktop *desktop, bool apply) // bottommost object, after sorting SPObject *parent = SP_OBJECT_PARENT (items->data); - Geom::Matrix parent_transform (sp_item_i2root_affine(SP_ITEM(parent))); + Geom::Matrix parent_transform (sp_item_i2doc_affine(SP_ITEM(parent))); // remember the position of the first item gint pos = SP_OBJECT_REPR (items->data)->position(); @@ -2899,7 +2899,7 @@ fit_canvas_to_drawing(SPDocument *doc) sp_document_ensure_up_to_date(doc); SPItem const *const root = SP_ITEM(doc->root); - Geom::OptRect const bbox(root->getBounds(sp_item_i2r_affine(root))); + Geom::OptRect const bbox(root->getBounds(sp_item_i2d_affine(root))); if (bbox) { doc->fitToRect(*bbox); return true; -- cgit v1.2.3