[mapserver-commits] r7859 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Fri Aug 15 08:01:53 EDT 2008
Author: tamas
Date: 2008-08-15 08:01:52 -0400 (Fri, 15 Aug 2008)
New Revision: 7859
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapagg.cpp
trunk/mapserver/mapgd.c
Log:
Added legend graphics for layer of type annotation for the AGG and GD renderer (#1523)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-08-15 11:51:03 UTC (rev 7858)
+++ trunk/mapserver/HISTORY.TXT 2008-08-15 12:01:52 UTC (rev 7859)
@@ -12,6 +12,12 @@
Current Version (5.3-dev, SVN trunk):
------------------------------------
+- Added legend graphics for layer of type annotation
+ for the AGG and GD renderer (#1523)
+
+- Masking the out-of-range characters to avoid the crash
+ in the AGG renderer (#2739)
+
- Accept WMS requests in which the optional SERVICE parameter is missing.
A new test was incorrectly added in 5.2.0 that resulted in the error
"Incomplete WFS request: SERVICE parameter missing" when the SERVICE
Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp 2008-08-15 11:51:03 UTC (rev 7858)
+++ trunk/mapserver/mapagg.cpp 2008-08-15 12:01:52 UTC (rev 7859)
@@ -2345,6 +2345,21 @@
*/
switch(type) {
case MS_LAYER_ANNOTATION:
+ if (theclass->label.size != -1)
+ {
+ rectObj label_rect;
+ labelObj label = theclass->label;
+ label.angle = 0;
+ if (label.type == MS_TRUETYPE) label.size = height;
+ marker.x = dstX + MS_NINT(width / 2.0);
+ marker.y = dstY + MS_NINT(height / 2.0);
+ if(msGetLabelSizeAGG(image, "Aa", &label, &label_rect, &map->fontset, 1.0, MS_FALSE) != -1)
+ {
+ pointObj label_point = get_metrics(&marker, MS_CC, label_rect, 0, 0, label.angle, 0, NULL);
+ msDrawTextAGG(image, label_point, "Aa", &label, &map->fontset, 1.0);
+ }
+ }
+ break;
case MS_LAYER_POINT:
marker.x = dstX + MS_NINT(width / 2.0);
marker.y = dstY + MS_NINT(height / 2.0);
Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c 2008-08-15 11:51:03 UTC (rev 7858)
+++ trunk/mapserver/mapgd.c 2008-08-15 12:01:52 UTC (rev 7859)
@@ -3190,6 +3190,21 @@
switch(type) {
case MS_LAYER_ANNOTATION:
+ if (class->label.size != -1)
+ {
+ rectObj label_rect;
+ labelObj label = class->label;
+ label.angle = 0;
+ if (label.type == MS_TRUETYPE) label.size = height;
+ marker.x = dstX + MS_NINT(width / 2.0);
+ marker.y = dstY + MS_NINT(height / 2.0);
+ if(msGetLabelSizeGD("Aa", &label, &label_rect, &map->fontset, 1.0, MS_FALSE) != -1)
+ {
+ pointObj label_point = get_metrics(&marker, MS_CC, label_rect, 0, 0, label.angle, 0, NULL);
+ msDrawTextGD(img, label_point, "Aa", &label, &map->fontset, 1.0);
+ }
+ }
+ break;
case MS_LAYER_POINT:
marker.x = dstX + MS_NINT(width / 2.0);
marker.y = dstY + MS_NINT(height / 2.0);
More information about the mapserver-commits
mailing list