Skip to content

Commit 135997a

Browse files
committed
fix incorrect rounding/casting when scaling label outlinewidth (#5107)
1 parent 982f3e6 commit 135997a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

maprendering.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,8 @@ int msDrawTextSymbol(mapObj *map, imageObj *image, pointObj labelPnt, textSymbol
10231023
c = &ts->label->color;
10241024
if(MS_VALID_COLOR(ts->label->outlinecolor))
10251025
oc = &ts->label->outlinecolor;
1026-
ow = ts->label->outlinewidth * (ts->textpath->glyph_size / ts->label->size);
1026+
ow = MS_NINT((double)ts->label->outlinewidth * ((double)ts->textpath->glyph_size / (double)ts->label->size));
1027+
msDebug("setting outlinewidth to %d (%d, %d, %d)\n",ow,ts->label->outlinewidth, ts->textpath->glyph_size, ts->label->size);
10271028
if(!renderer->renderGlyphs) return MS_FAILURE;
10281029
return renderer->renderGlyphs(image,ts->textpath,c,oc,ow);
10291030

0 commit comments

Comments
 (0)