summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2013-09-18 18:46:36 +0000
committerMartin Owens <doctormo@gmail.com>2013-09-18 18:46:36 +0000
commit0f85e2c60c4406eaddc7a96d8ddcc05d36d458f2 (patch)
treea6419f2d3428bf3e6f6cd6b57f427602c63f381b /src/display
parentFix cmake+ninja install (bug #1224543) (diff)
downloadinkscape-0f85e2c60c4406eaddc7a96d8ddcc05d36d458f2.tar.gz
inkscape-0f85e2c60c4406eaddc7a96d8ddcc05d36d458f2.zip
Remove setItemBounds and _item_bbox because aren't sensible, replace with bbox.
Fixed bugs: - https://launchpad.net/bugs/243729 (bzr r12528)
Diffstat (limited to 'src/display')
-rw-r--r--src/display/drawing-item.cpp6
-rw-r--r--src/display/drawing-item.h2
-rw-r--r--src/display/drawing-shape.cpp4
-rw-r--r--src/display/drawing-text.cpp4
-rw-r--r--src/display/nr-filter.cpp8
5 files changed, 8 insertions, 16 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index 1814dd615..097a5fe76 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -281,12 +281,6 @@ DrawingItem::setZOrder(unsigned z)
_markForRendering();
}
-void
-DrawingItem::setItemBounds(Geom::OptRect const &bounds)
-{
- _item_bbox = bounds;
-}
-
/**
* Update derived data before operations.
* The purpose of this call is to recompute internal data which depends
diff --git a/src/display/drawing-item.h b/src/display/drawing-item.h
index 4a516512b..650653ce2 100644
--- a/src/display/drawing-item.h
+++ b/src/display/drawing-item.h
@@ -89,7 +89,6 @@ public:
Geom::OptIntRect geometricBounds() const { return _bbox; }
Geom::OptIntRect visualBounds() const { return _drawbox; }
- Geom::OptRect itemBounds() const { return _item_bbox; }
Geom::Affine ctm() const { return _ctm; }
Geom::Affine transform() const { return _transform ? *_transform : Geom::identity(); }
Drawing &drawing() const { return _drawing; }
@@ -175,7 +174,6 @@ protected:
Geom::Affine _ctm; ///< Total transform from item coords to display coords
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 e80f12486..e689d0755 100644
--- a/src/display/drawing-shape.cpp
+++ b/src/display/drawing-shape.cpp
@@ -179,8 +179,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, _item_bbox);
- has_stroke = _nrstyle.prepareStroke(ct, _item_bbox);
+ has_fill = _nrstyle.prepareFill(ct, _bbox);
+ has_stroke = _nrstyle.prepareStroke(ct, _bbox);
has_stroke &= (_nrstyle.stroke_width != 0);
if (has_fill || has_stroke) {
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index 55d54b770..fa9ce4ff8 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -398,8 +398,8 @@ unsigned DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &/*are
using Geom::X;
using Geom::Y;
- has_fill = _nrstyle.prepareFill( ct, _item_bbox);
- has_stroke = _nrstyle.prepareStroke(ct, _item_bbox);
+ has_fill = _nrstyle.prepareFill( ct, _bbox);
+ has_stroke = _nrstyle.prepareStroke(ct, _bbox);
if (has_fill || has_stroke) {
Geom::Affine rotinv;
diff --git a/src/display/nr-filter.cpp b/src/display/nr-filter.cpp
index 4f2a18531..54bd36168 100644
--- a/src/display/nr-filter.cpp
+++ b/src/display/nr-filter.cpp
@@ -114,13 +114,13 @@ int Filter::render(Inkscape::DrawingItem const *item, DrawingContext &graphic, D
Geom::Affine trans = item->ctm();
-// Geom::OptRect filter_area = filter_effect_area(item->itemBounds()); // disabled, already done in visualBounds
- Geom::OptRect filter_area = item->itemBounds(); // see LP Bug 1188336
+ // Get filter are, the filter_effect_area is already done in visualBounds
+ Geom::OptRect filter_area = item->geometricBounds();
if (!filter_area) return 1;
FilterUnits units(_filter_units, _primitive_units);
units.set_ctm(trans);
- units.set_item_bbox(item->itemBounds());
+ units.set_item_bbox(item->geometricBounds());
units.set_filter_area(*filter_area);
std::pair<double,double> resolution
@@ -200,7 +200,7 @@ void Filter::area_enlarge(Geom::IntRect &bbox, Inkscape::DrawingItem const *item
}
Geom::Rect item_bbox;
- Geom::OptRect maybe_bbox = item->itemBounds();
+ Geom::OptRect maybe_bbox = item->geometricBounds();
if (maybe_bbox.isEmpty()) {
// Code below needs a bounding box
return;