summaryrefslogtreecommitdiffstats
path: root/src/display/drawing-item.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-09-20 20:27:08 +0000
committerMartin Owens <doctormo@gmail.com>2013-09-20 20:27:08 +0000
commitd332b7a8d0e55612abc377a107bb1768fc657637 (patch)
treeb67ef82509bc254c8dcc8aede2c7f09e0e488d96 /src/display/drawing-item.cpp
parentFix build with dbus api enabled. (diff)
downloadinkscape-d332b7a8d0e55612abc377a107bb1768fc657637.tar.gz
inkscape-d332b7a8d0e55612abc377a107bb1768fc657637.zip
Fix the text filter issue and revert many changes.
(bzr r12556)
Diffstat (limited to 'src/display/drawing-item.cpp')
-rw-r--r--src/display/drawing-item.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index a9836a9e3..1af07cb44 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -281,8 +281,15 @@ DrawingItem::setZOrder(unsigned z)
_markForRendering();
}
-void
-DrawingItem::setItemBounds(Geom::OptRect const &bounds)
+void DrawingItem::setItemBounds(Geom::OptRect const &bounds)
+{
+ if (!bounds) return;
+ Geom::IntRect copy = bounds->roundOutwards();
+ if (_filter) _filter->area_enlarge(copy, this);
+ this->setFilterBounds(copy);
+}
+
+void DrawingItem::setFilterBounds(Geom::OptRect const &bounds)
{
if (bounds) _filter_bbox = bounds;
}
@@ -352,10 +359,10 @@ DrawingItem::update(Geom::IntRect const &area, UpdateContext const &ctx, unsigne
if (to_update & STATE_BBOX) {
// compute drawbox
- if (_filter && render_filters && _bbox) {
- Geom::IntRect newbox(*_bbox);
- _filter->area_enlarge(newbox, this);
- _drawbox = Geom::OptIntRect(newbox);
+ if (_filter && render_filters && _filter_bbox) {
+ Geom::OptRect enlarged = _filter_bbox;
+ *enlarged *= ctm();
+ _drawbox = enlarged->roundOutwards();
} else {
_drawbox = _bbox;
}