Permalink
Browse files

fix incorrect rounding/casting when scaling label outlinewidth (#5107)

  • Loading branch information...
tbonfort committed Jul 13, 2015
1 parent 982f3e6 commit 135997a686326a46030b08ce1d58e1a4a3de08b7
Showing with 2 additions and 1 deletion.
  1. +2 −1 maprendering.c
View
@@ -1023,7 +1023,8 @@ int msDrawTextSymbol(mapObj *map, imageObj *image, pointObj labelPnt, textSymbol
c = &ts->label->color;
if(MS_VALID_COLOR(ts->label->outlinecolor))
oc = &ts->label->outlinecolor;
- ow = ts->label->outlinewidth * (ts->textpath->glyph_size / ts->label->size);
+ ow = MS_NINT((double)ts->label->outlinewidth * ((double)ts->textpath->glyph_size / (double)ts->label->size));
+ msDebug("setting outlinewidth to %d (%d, %d, %d)\n",ow,ts->label->outlinewidth, ts->textpath->glyph_size, ts->label->size);
if(!renderer->renderGlyphs) return MS_FAILURE;
return renderer->renderGlyphs(image,ts->textpath,c,oc,ow);

0 comments on commit 135997a

Please sign in to comment.