diff options
| author | Ted Gould <ted@gould.cx> | 2008-10-11 15:16:23 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-10-11 15:16:23 +0000 |
| commit | 2f5eb047d9e05be5e68549ef6b75070d2faa7d2f (patch) | |
| tree | ca2e94164b6d7aaebfc17196ca46bfc825a7665a /src/object-snapper.cpp | |
| parent | Merge from trunk. (diff) | |
| download | inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.tar.gz inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.zip | |
Merging from trunk
(bzr r6884)
Diffstat (limited to 'src/object-snapper.cpp')
| -rw-r--r-- | src/object-snapper.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index 13fba8060..cbf31c271 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -138,20 +138,20 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, if (SP_IS_GROUP(o)) { _findCandidates(o, it, false, bbox_to_snap, snap_dim, false, Geom::identity()); } else { - boost::optional<NR::Rect> bbox_of_item = NR::Rect(); + boost::optional<Geom::Rect> bbox_of_item = Geom::Rect(); if (clip_or_mask) { // Oh oh, this will get ugly. We cannot use sp_item_i2d_affine directly because we need to // insert an additional transformation in document coordinates (code copied from sp_item_i2d_affine) sp_item_invoke_bbox(item, bbox_of_item, - from_2geom(to_2geom(sp_item_i2doc_affine(item)) * matrix_to_desktop(additional_affine, item)), + sp_item_i2doc_affine(item) * matrix_to_desktop(additional_affine, item), true); } else { sp_item_invoke_bbox(item, bbox_of_item, sp_item_i2d_affine(item), true); } if (bbox_of_item) { // See if the item is within range - if (bbox_to_snap_incl.intersects(to_2geom(*bbox_of_item))) { + if (bbox_to_snap_incl.intersects(*bbox_of_item)) { // This item is within snapping range, so record it as a candidate _candidates->push_back(SnapCandidate(item, clip_or_mask, additional_affine)); } @@ -204,9 +204,7 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::Snapper::PointType const & //Collect all nodes so we can snap to them if (_snap_to_itemnode) { if (!(_strict_snapping && !p_is_a_node) || p_is_a_guide) { - std::vector<NR::Point> dummy_vctr; - sp_item_snappoints(root_item, _include_item_center, SnapPointsIter(dummy_vctr)); - to_2geom(dummy_vctr, *_points_to_snap_to); + sp_item_snappoints(root_item, _include_item_center, SnapPointsIter(*_points_to_snap_to)); } } @@ -216,10 +214,10 @@ void Inkscape::ObjectSnapper::_collectNodes(Inkscape::Snapper::PointType const & // Discard the bbox of a clipped path / mask, because we don't want to snap to both the bbox // of the item AND the bbox of the clipping path at the same time if (!(*i).clip_or_mask) { - boost::optional<NR::Rect> b = sp_item_bbox_desktop(root_item, bbox_type); + boost::optional<Geom::Rect> b = sp_item_bbox_desktop(root_item, bbox_type); if (b) { for ( unsigned k = 0 ; k < 4 ; k++ ) { - _points_to_snap_to->push_back(to_2geom(b->corner(k))); + _points_to_snap_to->push_back(b->corner(k)); } } } |
