summaryrefslogtreecommitdiffstats
path: root/src/widgets/select-toolbar.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-27 09:04:37 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-27 09:04:37 +0000
commit72cc39b9f0b340548f395c7f61ca9662b34aea09 (patch)
tree34a0853cff6c6040bc2a0572dfa365280fce2601 /src/widgets/select-toolbar.cpp
parentFix "snap guides" toggle (diff)
downloadinkscape-72cc39b9f0b340548f395c7f61ca9662b34aea09.tar.gz
inkscape-72cc39b9f0b340548f395c7f61ca9662b34aea09.zip
Refactor SPItem bounding box methods: remove NRRect usage and make code
using them more obvious. Fix filter region computation. (bzr r10582.1.1)
Diffstat (limited to 'src/widgets/select-toolbar.cpp')
-rw-r--r--src/widgets/select-toolbar.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 260c09c69..5f90a8997 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -70,7 +70,7 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel)
if ( sel && !sel->isEmpty() ) {
int prefs_bbox = prefs->getInt("/tools/bounding_box", 0);
SPItem::BBoxType bbox_type = (prefs_bbox ==0)?
- SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
+ SPItem::VISUAL_BBOX : SPItem::GEOMETRIC_BBOX;
Geom::OptRect const bbox(sel->bounds(bbox_type));
if ( bbox ) {
UnitTracker *tracker = reinterpret_cast<UnitTracker*>(g_object_get_data(G_OBJECT(spw), "tracker"));
@@ -160,12 +160,12 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
document->ensureUpToDate ();
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- Geom::OptRect bbox_vis = selection->bounds(SPItem::APPROXIMATE_BBOX);
- Geom::OptRect bbox_geom = selection->bounds(SPItem::GEOMETRIC_BBOX);
+ Geom::OptRect bbox_vis = selection->visualBounds();
+ Geom::OptRect bbox_geom = selection->geometricBounds();
int prefs_bbox = prefs->getInt("/tools/bounding_box");
SPItem::BBoxType bbox_type = (prefs_bbox == 0)?
- SPItem::APPROXIMATE_BBOX : SPItem::GEOMETRIC_BBOX;
+ SPItem::VISUAL_BBOX : SPItem::GEOMETRIC_BBOX;
Geom::OptRect bbox_user = selection->bounds(bbox_type);
if ( !bbox_user ) {
@@ -247,10 +247,10 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
int transform_stroke = prefs->getBool("/options/transform/stroke", true) ? 1 : 0;
Geom::Affine scaler;
- if (bbox_type == SPItem::APPROXIMATE_BBOX) {
+ if (bbox_type == SPItem::VISUAL_BBOX) {
scaler = get_scale_transform_with_unequal_stroke (*bbox_vis, *bbox_geom, transform_stroke, x0, y0, x1, y1);
} else {
- // get_scale_transform_with_stroke() is intended for VISUAL (or APPROXIMATE) bounding boxes, not geometrical ones!
+ // get_scale_transform_with_stroke() is intended for visual bounding boxes, not geometrical ones!
// we'll trick it into using a geometric bounding box though, by setting the stroke width to zero
scaler = get_scale_transform_with_uniform_stroke (*bbox_user, 0, false, x0, y0, x1, y1);
}