Permalink
Browse files

Apply legend label offset if set (#5267)

  • Loading branch information...
1 parent 537a312 commit d7b5df7e2e1a2a1af2a302ee6a221381ebd2a67c @tbonfort tbonfort committed Aug 27, 2016
Showing with 5 additions and 3 deletions.
  1. +5 −3 maplegend.c
View
@@ -697,11 +697,13 @@ imageObj *msDrawLegend(mapObj *map, int scale_independent, map_hittest *hittest)
pnt.y += cur->height;
if(cur->ts.annotext) {
- pnt.y -= cur->ts.textpath->bounds.bbox.maxy;
- ret = msDrawTextSymbol(map,image,pnt,&cur->ts);
+ pointObj textPnt = pnt;
+ textPnt.y -= cur->ts.textpath->bounds.bbox.maxy;
+ textPnt.y += map->legend.label.offsety;
+ textPnt.x += map->legend.label.offsetx;
+ ret = msDrawTextSymbol(map,image,textPnt,&cur->ts);
if(UNLIKELY(ret == MS_FAILURE))
goto cleanup;
- pnt.y += cur->ts.textpath->bounds.bbox.maxy;
freeTextSymbol(&cur->ts);
}

0 comments on commit d7b5df7

Please sign in to comment.