summaryrefslogtreecommitdiffstats
path: root/src/selection.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2007-04-08 21:07:29 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2007-04-08 21:07:29 +0000
commit8417209743e184c46d7ec845928bfbee5f8d8d77 (patch)
tree9c9e0738f2cc3c3d7b4c8007dafd5e3f98750a8f /src/selection.cpp
parentCorrected jumping and alignment of coordinates in status. (diff)
downloadinkscape-8417209743e184c46d7ec845928bfbee5f8d8d77.tar.gz
inkscape-8417209743e184c46d7ec845928bfbee5f8d8d77.zip
Changes to the selector tool, e.g. option to choose either APPROXIMATE_BBOX or GEOMETRIC_BBOX
(bzr r2833)
Diffstat (limited to 'src/selection.cpp')
-rw-r--r--src/selection.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/selection.cpp b/src/selection.cpp
index 05bd8d030..44f601362 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -304,25 +304,25 @@ Inkscape::XML::Node *Selection::singleRepr() {
return obj ? SP_OBJECT_REPR(obj) : NULL;
}
-NRRect *Selection::bounds(NRRect *bbox) const
+NRRect *Selection::bounds(NRRect *bbox, SPItem::BBoxType type) const
{
g_return_val_if_fail (bbox != NULL, NULL);
- *bbox = NRRect(bounds());
+ *bbox = NRRect(bounds(type));
return bbox;
}
-NR::Maybe<NR::Rect> Selection::bounds() const
+NR::Maybe<NR::Rect> Selection::bounds(SPItem::BBoxType type) const
{
GSList const *items = const_cast<Selection *>(this)->itemList();
NR::Maybe<NR::Rect> bbox = NR::Nothing();
for ( GSList const *i = items ; i != NULL ; i = i->next ) {
- bbox = NR::union_bounds(bbox, sp_item_bbox_desktop(SP_ITEM(i->data)));
+ bbox = NR::union_bounds(bbox, sp_item_bbox_desktop(SP_ITEM(i->data), type));
}
return bbox;
}
-NRRect *Selection::boundsInDocument(NRRect *bbox) const {
+NRRect *Selection::boundsInDocument(NRRect *bbox, SPItem::BBoxType type) const {
g_return_val_if_fail (bbox != NULL, NULL);
GSList const *items=const_cast<Selection *>(this)->itemList();
@@ -336,16 +336,16 @@ NRRect *Selection::boundsInDocument(NRRect *bbox) const {
for ( GSList const *iter=items ; iter != NULL ; iter = iter->next ) {
SPItem *item=SP_ITEM(iter->data);
- NR::Matrix const i2doc(sp_item_i2doc_affine(item));
- sp_item_invoke_bbox(item, bbox, i2doc, FALSE);
+ NR::Matrix i2doc(sp_item_i2doc_affine(item));
+ sp_item_invoke_bbox(item, bbox, i2doc, FALSE, type);
}
return bbox;
}
-NR::Maybe<NR::Rect> Selection::boundsInDocument() const {
+NR::Maybe<NR::Rect> Selection::boundsInDocument(SPItem::BBoxType type) const {
NRRect r;
- return boundsInDocument(&r)->upgrade();
+ return boundsInDocument(&r, type)->upgrade();
}
/** Extract the position of the center from the first selected object */