diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-06-26 21:07:31 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-06-26 21:07:31 +0000 |
| commit | a05ff8fca661b5681e43221f29a157fd7a26c106 (patch) | |
| tree | 29fbf8b08f69ee5bf07f5a7225d37d6feaeca424 /src/sp-item.cpp | |
| parent | Add gtkrc to build.xml. Fix native path on <makefile> (diff) | |
| download | inkscape-a05ff8fca661b5681e43221f29a157fd7a26c106.tar.gz inkscape-a05ff8fca661b5681e43221f29a157fd7a26c106.zip | |
implementing snapping to images
(bzr r3110)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 9e836e84a..fbcc7b4a8 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -762,12 +762,17 @@ NR::Maybe<NR::Rect> sp_item_bbox_desktop(SPItem *item, SPItem::BBoxType type) static void sp_item_private_snappoints(SPItem const *item, SnapPointsIter p) { NR::Maybe<NR::Rect> bbox = item->getBounds(sp_item_i2d_affine(item)); - /* Just a pair of opposite corners of the bounding box suffices given that we don't yet + /* Just the corners of the bounding box suffices given that we don't yet support angled guide lines. */ if (bbox) { - *p = bbox->min(); - *p = bbox->max(); + NR::Point p1, p2; + p1 = bbox->min(); + p2 = bbox->max(); + *p = p1; + *p = NR::Point(p1[NR::X], p2[NR::Y]); + *p = p2; + *p = NR::Point(p1[NR::Y], p2[NR::X]); } } |
