diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-25 17:39:31 +0000 |
|---|---|---|
| committer | Krzysztof Kosinski <tweenk.pl@gmail.com> | 2011-08-25 17:39:31 +0000 |
| commit | abe953dc63948d78532c0541a56e664dc386810a (patch) | |
| tree | 869e86a76f9c120e71e786f8664306730565e237 /src/display | |
| parent | Filter background rendering now matches the SVG specification. (diff) | |
| download | inkscape-abe953dc63948d78532c0541a56e664dc386810a.tar.gz inkscape-abe953dc63948d78532c0541a56e664dc386810a.zip | |
Remove duplicate bbox data from DrawingShape
(bzr r10347.1.38)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/drawing-item.h | 6 | ||||
| -rw-r--r-- | src/display/drawing-shape.cpp | 11 | ||||
| -rw-r--r-- | src/display/drawing-shape.h | 2 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/display/drawing-item.h b/src/display/drawing-item.h index 7a3b8047b..424616427 100644 --- a/src/display/drawing-item.h +++ b/src/display/drawing-item.h @@ -161,9 +161,9 @@ protected: Geom::Affine *_transform; ///< Incremental transform from parent to this item's coords Geom::Affine _ctm; ///< Total transform from item coords to display coords - Geom::OptIntRect _bbox; ///< Bounding box in display (pixel) coords - Geom::OptIntRect _drawbox; ///< Bounding box enlarged by filters, shrinked by clips and masks - Geom::OptRect _item_bbox; ///< Bounding box in item coordinates + Geom::OptIntRect _bbox; ///< Bounding box in display (pixel) coords including stroke + Geom::OptIntRect _drawbox; ///< Full visual bounding box - enlarged by filters, shrunk by clips and masks + Geom::OptRect _item_bbox; ///< Geometric bounding box in item coordinates DrawingItem *_clip; DrawingItem *_mask; diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index cd7b9150d..ac0ff2ccb 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -72,13 +72,6 @@ DrawingShape::setStyle(SPStyle *style) _nrstyle.set(style); } -void -DrawingShape::setPaintBox(Geom::Rect const &box) -{ - _paintbox = box; - _markForUpdate(STATE_ALL, false); -} - unsigned DrawingShape::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset) { @@ -187,8 +180,8 @@ DrawingShape::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigne // update fill and stroke paints. // this cannot be done during nr_arena_shape_update, because we need a Cairo context // to render svg:pattern - has_fill = _nrstyle.prepareFill(ct, _paintbox); - has_stroke = _nrstyle.prepareStroke(ct, _paintbox); + has_fill = _nrstyle.prepareFill(ct, _item_bbox); + has_stroke = _nrstyle.prepareStroke(ct, _item_bbox); has_stroke &= (_nrstyle.stroke_width != 0); if (has_fill || has_stroke) { diff --git a/src/display/drawing-shape.h b/src/display/drawing-shape.h index 122130590..27bd7fbba 100644 --- a/src/display/drawing-shape.h +++ b/src/display/drawing-shape.h @@ -29,7 +29,6 @@ public: void setPath(SPCurve *curve); void setStyle(SPStyle *style); - void setPaintBox(Geom::Rect const &box); protected: virtual unsigned _updateItem(Geom::IntRect const &area, UpdateContext const &ctx, @@ -44,7 +43,6 @@ protected: SPStyle *_style; NRStyle _nrstyle; - Geom::OptRect _paintbox; DrawingItem *_last_pick; unsigned _repick_after; }; |
