summaryrefslogtreecommitdiffstats
path: root/src/display
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-09-06 14:47:56 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-09-06 14:47:56 +0000
commit34c0a97e8328623b7810c6661e7a559abf282536 (patch)
tree3f12cb1d0d33e41de37a139bbdc4036b10053422 /src/display
parentWhen scaling a diagonal line to a horizontal line, the strokewidth becomes Na... (diff)
downloadinkscape-34c0a97e8328623b7810c6661e7a559abf282536.tar.gz
inkscape-34c0a97e8328623b7810c6661e7a559abf282536.zip
Further fixes for text rendering and picking
(bzr r10622)
Diffstat (limited to 'src/display')
-rw-r--r--src/display/drawing-text.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp
index 4a20875ae..23a7cfdfb 100644
--- a/src/display/drawing-text.cpp
+++ b/src/display/drawing-text.cpp
@@ -73,11 +73,11 @@ DrawingGlyphs::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx,
if (_transform) scale /= _transform->descrim(); // FIXME temporary hack
width = MAX(0.125, ggroup->_nrstyle.stroke_width * scale);
if ( fabs(ggroup->_nrstyle.stroke_width * scale) > 0.01 ) { // FIXME: this is always true
- b->expandBy(width);
+ b->expandBy(0.5 * width);
}
- // save no-miter bbox for picking
+ // save bbox without miters for picking
_pick_bbox = b->roundOutwards();
- // those pesky miters, now
+
float miterMax = width * ggroup->_nrstyle.miter_limit;
if ( miterMax > 0.01 ) {
// grunt mode. we should compute the various miters instead
@@ -85,6 +85,9 @@ DrawingGlyphs::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx,
b->expandBy(miterMax);
}
_bbox = b->roundOutwards();
+ } else if (b) {
+ _bbox = b->roundOutwards();
+ _pick_bbox = *_bbox;
}
return STATE_ALL;