Permalink
Browse files

Fix ANCHORPOINT not being written for TRUETYPE and PIXMAP symbols (#5073

)
  • Loading branch information...
1 parent 7c85787 commit 81ef223e0480b63a1671377687c37d9d22e4b035 @szekerest szekerest committed Sep 15, 2016
Showing with 6 additions and 0 deletions.
  1. +6 −0 mapsymbol.c
View
@@ -300,12 +300,18 @@ void writeSymbol(symbolObj *s, FILE *stream)
case(MS_SYMBOL_PIXMAP):
msIO_fprintf(stream, " TYPE PIXMAP\n");
if(s->imagepath != NULL) msIO_fprintf(stream, " IMAGE \"%s\"\n", s->imagepath);
+ if(s->anchorpoint_y!=0.5 || s->anchorpoint_x!=0.5) {
+ msIO_fprintf(stream, " ANCHORPOINT %g %g\n", s->anchorpoint_x, s->anchorpoint_y);
+ }
msIO_fprintf(stream, " TRANSPARENT %d\n", s->transparentcolor);
break;
case(MS_SYMBOL_TRUETYPE):
msIO_fprintf(stream, " TYPE TRUETYPE\n");
if (s->character != NULL) msIO_fprintf(stream, " CHARACTER \"%s\"\n", s->character);
if (s->font != NULL) msIO_fprintf(stream, " FONT \"%s\"\n", s->font);
+ if(s->anchorpoint_y!=0.5 || s->anchorpoint_x!=0.5) {
+ msIO_fprintf(stream, " ANCHORPOINT %g %g\n", s->anchorpoint_x, s->anchorpoint_y);
+ }
break;
default:
if(s->type == MS_SYMBOL_ELLIPSE)

0 comments on commit 81ef223

Please sign in to comment.