From 53933f5fea9d07d1ba6304b88439fba257ee8c34 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 2 Feb 2011 22:24:36 +0100 Subject: update to latest 2geom ! (bzr r10025) --- src/object-snapper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 43651f002..e123173a5 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -84,7 +84,7 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, bool const &first_point, Geom::Rect const &bbox_to_snap, bool const clip_or_mask, - Geom::Matrix const additional_affine) const // transformation of the item being clipped / masked + Geom::Affine const additional_affine) const // transformation of the item being clipped / masked { if (!ThisSnapperMightSnap()) { return; @@ -198,7 +198,7 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::SnapSourceType const &t, } for (std::vector::const_iterator i = _candidates->begin(); i != _candidates->end(); i++) { - //Geom::Matrix i2doc(Geom::identity()); + //Geom::Affine i2doc(Geom::identity()); SPItem *root_item = (*i).item; if (SP_IS_USE((*i).item)) { root_item = sp_use_root(SP_USE((*i).item)); @@ -378,7 +378,7 @@ void Inkscape::ObjectSnapper::_collectPaths(Geom::Point /*p*/, for (std::vector::const_iterator i = _candidates->begin(); i != _candidates->end(); i++) { /* Transform the requested snap point to this item's coordinates */ - Geom::Matrix i2doc(Geom::identity()); + Geom::Affine i2doc(Geom::identity()); SPItem *root_item = NULL; /* We might have a clone at hand, so make sure we get the root item */ if (SP_IS_USE((*i).item)) { -- cgit v1.2.3 From 5b3ed01dbaa86945e071db4103f39c5fe4b2f691 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Fri, 4 Feb 2011 06:48:16 +0100 Subject: Fix a snap bug in which the snapped to the help path instead of the real path (bzr r10032) --- src/object-snapper.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/object-snapper.cpp') diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index e123173a5..1e2f71c95 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -414,8 +414,13 @@ void Inkscape::ObjectSnapper::_collectPaths(Geom::Point /*p*/, very_complex_path = sp_nodes_in_path(SP_PATH(root_item)) > 500; } - if (!very_lenghty_prose && !very_complex_path) { - SPCurve *curve = curve_for_item(root_item); + if (!very_lenghty_prose && !very_complex_path && root_item) { + SPCurve *curve = NULL; + if (SP_IS_SHAPE(root_item)) { + curve = SP_SHAPE(root_item)->getCurve(); + } else if (SP_IS_TEXT(root_item) || SP_IS_FLOWTEXT(root_item)) { + curve = te_get_layout(root_item)->convertToCurves(); + } if (curve) { // We will get our own copy of the pathvector, which must be freed at some point -- cgit v1.2.3