From: buliabyak Date: Wed, 15 Feb 2006 19:05:25 +0000 (+0000) Subject: fix 1432089: stroke is not drawn not only when it's not set but also when it's too... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f5c0236a5cad739899ead1b24864c3c8654ab078;p=inkscape.git fix 1432089: stroke is not drawn not only when it's not set but also when it's too thin --- diff --git a/src/display/nr-arena-glyphs.cpp b/src/display/nr-arena-glyphs.cpp index 861b8baf8..05b513e52 100644 --- a/src/display/nr-arena-glyphs.cpp +++ b/src/display/nr-arena-glyphs.cpp @@ -147,6 +147,8 @@ nr_arena_glyphs_update (NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, bbox.x0 = bbox.y0 = NR_HUGE; bbox.x1 = bbox.y1 = -NR_HUGE; + const float scale = NR_MATRIX_DF_EXPANSION (&gc->transform); + if (glyphs->style->fill.type != SP_PAINT_TYPE_NONE) { NRMatrix t; nr_matrix_multiply (&t, &glyphs->g_transform, &gc->transform); @@ -158,7 +160,7 @@ nr_arena_glyphs_update (NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, if (glyphs->rfont) glyphs->rfont->Unref(); glyphs->rfont = rfont; - if (glyphs->style->stroke.type == SP_PAINT_TYPE_NONE) { // Optimization: do fill bbox only if there's no stroke + if (glyphs->style->stroke.type == SP_PAINT_TYPE_NONE || fabs(glyphs->style->stroke_width.computed * scale) <= 0.01) { // Optimization: do fill bbox only if there's no stroke NRRect narea; if ( glyphs->rfont ) glyphs->rfont->BBox(glyphs->glyph, &narea); bbox.x0 = narea.x0 + glyphs->x; @@ -177,7 +179,6 @@ nr_arena_glyphs_update (NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, t.c[4]=0; t.c[5]=0; - const float scale = NR_MATRIX_DF_EXPANSION (&gc->transform); if ( fabs(glyphs->style->stroke_width.computed * scale) > 0.01 ) { // sinon c'est 0=oon veut pas de bord font_style nstyl; nstyl.transform = t;