Permalink
Browse files

Fix rendering legend icons for labelpnt and labelpoly geometry transf…

…ormations (#4642)
  • Loading branch information...
1 parent 37455d7 commit 929ed6fae092dfc532391529e8250659d108081a @szekerest szekerest committed May 7, 2013
Showing with 9 additions and 4 deletions.
  1. +9 −4 maplegend.c
View
@@ -232,11 +232,14 @@ int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *theclass,
zigzag.line[0].point[3].y = dstY + offset;
for(i=0; i<theclass->numstyles; i++) {
- if (theclass->styles[i]->_geomtransform.type != MS_GEOMTRANSFORM_NONE)
+ if (theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_NONE ||
+ theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOINT ||
+ theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOLY)
+ msDrawLineSymbol(&map->symbolset, image_draw, &zigzag, theclass->styles[i], lp->scalefactor);
+
+ else
msDrawTransformedShape(map, &map->symbolset, image_draw, &zigzag,
theclass->styles[i], lp->scalefactor);
- else
- msDrawLineSymbol(&map->symbolset, image_draw, &zigzag, theclass->styles[i], lp->scalefactor);
}
free(zigzag.line[0].point);
@@ -247,7 +250,9 @@ int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *theclass,
case MS_LAYER_CHART:
case MS_LAYER_POLYGON:
for(i=0; i<theclass->numstyles; i++)
- if (theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_NONE)
+ if (theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_NONE ||
+ theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOINT ||
+ theclass->styles[i]->_geomtransform.type == MS_GEOMTRANSFORM_LABELPOLY)
msDrawShadeSymbol(&map->symbolset, image_draw, &box, theclass->styles[i], lp->scalefactor);
else
msDrawTransformedShape(map, &map->symbolset, image_draw, &box,

0 comments on commit 929ed6f

Please sign in to comment.