[mapserver-commits] r13202 - sandbox/tb-labels

svn at osgeo.org svn at osgeo.org
Mon Mar 5 11:22:35 EST 2012


Author: tbonfort
Date: 2012-03-05 08:22:35 -0800 (Mon, 05 Mar 2012)
New Revision: 13202

Modified:
   sandbox/tb-labels/mapdraw.c
Log:
ensure image and svg symbols have been preloaded when used in the labelcache (#4225)


Modified: sandbox/tb-labels/mapdraw.c
===================================================================
--- sandbox/tb-labels/mapdraw.c	2012-03-05 13:50:45 UTC (rev 13201)
+++ sandbox/tb-labels/mapdraw.c	2012-03-05 16:22:35 UTC (rev 13202)
@@ -2649,6 +2649,19 @@
             style->symbol < map->symbolset.numsymbols && style->symbol > 0) {
          double sx,sy;
          symbolObj *symbol = map->symbolset.symbol[style->symbol];
+
+         if (symbol->type == MS_SYMBOL_PIXMAP) {
+            if (MS_SUCCESS != msPreloadImageSymbol(MS_MAP_RENDERER(map), symbol))
+               return MS_FAILURE;
+         } else if (symbol->type == MS_SYMBOL_SVG) {
+#ifdef USE_SVG_CAIRO
+            if (MS_SUCCESS != msPreloadSVGSymbol(symbol))
+               return MS_FAILURE;
+#else
+            msSetError(MS_SYMERR, "SVG symbol support is not enabled.", "msDrawShape()");
+            return MS_FAILURE;
+#endif
+         }
          if(msGetMarkerSize(&map->symbolset, style, &sx, &sy, layerPtr->scalefactor) != MS_SUCCESS)
             return MS_FAILURE;
          pointObj *point = markerPoly->line[0].point;



More information about the mapserver-commits mailing list