From 2be2cf32db0668dc64512a98f6c2394152bd10cc Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 16 Jul 2011 00:42:39 -0700 Subject: Cleanup of oudated/redundant SP_ITEM() macro use. (bzr r10461) --- src/box3d.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/box3d.cpp') diff --git a/src/box3d.cpp b/src/box3d.cpp index 1a9c26b26..efd4054e1 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -388,7 +388,7 @@ box3d_get_corner_screen (SPBox3D const *box, guint id, bool item_coords) { if (!box3d_get_perspective(box)) { return Geom::Point (Geom::infinity(), Geom::infinity()); } - Geom::Affine const i2d (SP_ITEM(box)->i2d_affine ()); + Geom::Affine const i2d(box->i2d_affine ()); if (item_coords) { return box3d_get_perspective(box)->perspective_impl->tmat.image(proj_corner).affine() * i2d.inverse(); } else { @@ -412,7 +412,7 @@ box3d_get_center_screen (SPBox3D *box) { if (!box3d_get_perspective(box)) { return Geom::Point (Geom::infinity(), Geom::infinity()); } - Geom::Affine const i2d (SP_ITEM(box)->i2d_affine ()); + Geom::Affine const i2d(box->i2d_affine ()); return box3d_get_perspective(box)->perspective_impl->tmat.image(proj_center).affine() * i2d.inverse(); } @@ -1180,7 +1180,7 @@ box3d_set_z_orders (SPBox3D *box) { for (unsigned int i = 0; i < 6; ++i) { side = sides.find(box->z_orders[i]); if (side != sides.end()) { - SP_ITEM((*side).second)->lowerToBottom(); + ((*side).second)->lowerToBottom(); } } } -- cgit v1.2.3 From eed6e9c2c229b10911a23976c47da79fc70a5b87 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 17 Jul 2011 21:47:09 +0200 Subject: - rename SPItem::i2d_affine to i2dt_affine, to clarify that it is item-to-desktop, not item-to-document. This should make it easier to spot bugs. - tag some instances where the document-to-desktop transform has been hardcoded (bzr r10466) --- src/box3d.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/box3d.cpp') diff --git a/src/box3d.cpp b/src/box3d.cpp index efd4054e1..ea1e35982 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -388,7 +388,7 @@ box3d_get_corner_screen (SPBox3D const *box, guint id, bool item_coords) { if (!box3d_get_perspective(box)) { return Geom::Point (Geom::infinity(), Geom::infinity()); } - Geom::Affine const i2d(box->i2d_affine ()); + Geom::Affine const i2d(box->i2dt_affine ()); if (item_coords) { return box3d_get_perspective(box)->perspective_impl->tmat.image(proj_corner).affine() * i2d.inverse(); } else { @@ -412,7 +412,7 @@ box3d_get_center_screen (SPBox3D *box) { if (!box3d_get_perspective(box)) { return Geom::Point (Geom::infinity(), Geom::infinity()); } - Geom::Affine const i2d(box->i2d_affine ()); + Geom::Affine const i2d( box->i2dt_affine() ); return box3d_get_perspective(box)->perspective_impl->tmat.image(proj_center).affine() * i2d.inverse(); } -- cgit v1.2.3 From 97b1c4d688a979eb8e327c13c6bcc6fad20902f2 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 19 Jul 2011 20:24:59 +0200 Subject: remove some unnecessary inkscape_active_desktop() calls (bzr r10477) --- src/box3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/box3d.cpp') diff --git a/src/box3d.cpp b/src/box3d.cpp index ea1e35982..23f934b64 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -1422,7 +1422,7 @@ box3d_convert_to_guides(SPItem *item) { box3d_push_back_corner_pair(box, pts, 2, 6); box3d_push_back_corner_pair(box, pts, 3, 7); - sp_guide_pt_pairs_to_guides(inkscape_active_desktop(), pts); + sp_guide_pt_pairs_to_guides(item->document, pts); } /* -- cgit v1.2.3