[mapserver-commits] r13181 - sandbox/tb-labels
svn at osgeo.org
svn at osgeo.org
Tue Feb 28 12:12:13 EST 2012
Author: tbonfort
Date: 2012-02-28 09:12:13 -0800 (Tue, 28 Feb 2012)
New Revision: 13181
Modified:
sandbox/tb-labels/mapdraw.c
Log:
make leader-line offseted labels also work for position auto labels
Modified: sandbox/tb-labels/mapdraw.c
===================================================================
--- sandbox/tb-labels/mapdraw.c 2012-02-28 16:42:38 UTC (rev 13180)
+++ sandbox/tb-labels/mapdraw.c 2012-02-28 17:12:13 UTC (rev 13181)
@@ -2567,8 +2567,9 @@
if(labelPtr->annotext)
msDrawText(image, labelPtr->annopoint, labelPtr->annotext, labelPtr, &(map->fontset), layerPtr->scalefactor); /* actually draw the label */
}
+ /* TODO: draw cachePtr->marker, but where ? */
- /*
+ /*
styleObj tstyle;
static int foo =0;
if(!foo) {
@@ -2582,7 +2583,8 @@
tstyle.color.green = random()%255;
tstyle.color.blue =random()%255;
msDrawLineSymbol(&map->symbolset, image, cachePtr->poly, &tstyle, layerPtr->scalefactor);
- */
+ */
+
} else {
msFree(cachePtr->leaderline->point);
msFree(cachePtr->leaderline);
@@ -2969,6 +2971,11 @@
msComputeBounds(&poly);
}
} /* next position */
+ if(classPtr->leader.maxdistance && labelPtr->status == MS_FALSE) {
+ labelPtr->annopoint = get_metrics(&(cachePtr->point), MS_CC, r,
+ marker_offset_x + label_offset_x, marker_offset_y + label_offset_y,
+ labelPtr->angle, label_buffer, &poly);
+ }
} else { /* explicit position */
if(labelPtr->annotext) {
More information about the mapserver-commits
mailing list