diff options
| author | Martin Owens <doctormo@gmail.com> | 2013-09-17 15:41:39 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2013-09-17 15:41:39 +0000 |
| commit | 5e05c910c59854938df73ba276b090773e9f6d0c (patch) | |
| tree | 39100ad5fe78798649d134138120d3d02296dc35 /src | |
| parent | Path->Inset trial 2. revert rev 12279. (fix Bug 1218333) (diff) | |
| download | inkscape-5e05c910c59854938df73ba276b090773e9f6d0c.tar.gz inkscape-5e05c910c59854938df73ba276b090773e9f6d0c.zip | |
Remove compute drawbox and replace with area_elarge, make sure we use bbox
(bzr r12525)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/drawing-item.cpp | 4 | ||||
| -rw-r--r-- | src/display/nr-filter.cpp | 14 | ||||
| -rw-r--r-- | src/display/nr-filter.h | 6 |
3 files changed, 3 insertions, 21 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp index 80664d822..1814dd615 100644 --- a/src/display/drawing-item.cpp +++ b/src/display/drawing-item.cpp @@ -353,7 +353,9 @@ DrawingItem::update(Geom::IntRect const &area, UpdateContext const &ctx, unsigne if (to_update & STATE_BBOX) { // compute drawbox if (_filter && render_filters) { - _drawbox = _filter->compute_drawbox(this, _item_bbox); + Geom::IntRect newbox(*_bbox); + _filter->area_enlarge(newbox, this); + _drawbox = Geom::OptIntRect(newbox); } else { _drawbox = _bbox; } diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp index f0965c460..4f2a18531 100644 --- a/src/display/nr-filter.cpp +++ b/src/display/nr-filter.cpp @@ -220,20 +220,6 @@ void Filter::area_enlarge(Geom::IntRect &bbox, Inkscape::DrawingItem const *item */ } -Geom::OptIntRect Filter::compute_drawbox(Inkscape::DrawingItem const *item, Geom::OptRect const &item_bbox) { - -// Geom::OptRect enlarged = filter_effect_area(item_bbox); // disabled, already done in visualBounds - Geom::OptRect enlarged = item_bbox; // see LP Bug 1188336 - if (enlarged) { - *enlarged *= item->ctm(); - - Geom::OptIntRect ret(enlarged->roundOutwards()); - return ret; - } else { - return Geom::OptIntRect(); - } -} - Geom::OptRect Filter::filter_effect_area(Geom::OptRect const &bbox) { Geom::Point minp, maxp; diff --git a/src/display/nr-filter.h b/src/display/nr-filter.h index d53005c5d..5df38ffe9 100644 --- a/src/display/nr-filter.h +++ b/src/display/nr-filter.h @@ -151,12 +151,6 @@ public: */ void area_enlarge(Geom::IntRect &area, Inkscape::DrawingItem const *item) const; /** - * Given an item bounding box (in user coords), this function enlarges it - * to contain the filter effects region and transforms it to screen - * coordinates - */ - Geom::OptIntRect compute_drawbox(Inkscape::DrawingItem const *item, Geom::OptRect const &item_bbox); - /** * Returns the filter effects area in user coordinate system. * The given bounding box should be a bounding box as specified in * SVG standard and in user coordinate system. |
