[mapserver-commits] r10574 - sandbox/mapserver6
svn at osgeo.org
svn at osgeo.org
Thu Oct 7 09:21:38 EDT 2010
Author: assefa
Date: 2010-10-07 13:21:38 +0000 (Thu, 07 Oct 2010)
New Revision: 10574
Modified:
sandbox/mapserver6/mapkmlrenderer.cpp
sandbox/mapserver6/maprendering.c
Log:
fix icon creation for kml renderer
Modified: sandbox/mapserver6/mapkmlrenderer.cpp
===================================================================
--- sandbox/mapserver6/mapkmlrenderer.cpp 2010-10-05 01:01:40 UTC (rev 10573)
+++ sandbox/mapserver6/mapkmlrenderer.cpp 2010-10-07 13:21:38 UTC (rev 10574)
@@ -354,6 +354,9 @@
if (tmpFile)
{
+ if (!aggFormat->vtable)
+ msInitializeRendererVTable(aggFormat);
+
msSaveRasterBuffer(rb,tmpFile,aggFormat);
tmpUrl = strdup( image->imageurl);
tmpUrl = msStringConcatenate(tmpUrl, (char *)(msGetBasename(tmpFileName)));
@@ -630,10 +633,12 @@
imageObj *tmpImg = NULL;
- agg2CreateImage((int)(symbol->sizex*symstyle->scale),
+ tmpImg = agg2CreateImage((int)(symbol->sizex*symstyle->scale),
(int)(symbol->sizey*symstyle->scale),
aggFormat, NULL);
tmpImg->format = aggFormat;
+ if (!aggFormat->vtable)
+ msInitializeRendererVTable(aggFormat);
p.x = symbol->sizex * symstyle->scale / 2;
p.y = symbol->sizey *symstyle->scale / 2;
Modified: sandbox/mapserver6/maprendering.c
===================================================================
--- sandbox/mapserver6/maprendering.c 2010-10-05 01:01:40 UTC (rev 10573)
+++ sandbox/mapserver6/maprendering.c 2010-10-07 13:21:38 UTC (rev 10574)
@@ -395,8 +395,10 @@
}
break;
}
-
+
+ INIT_SYMBOL_STYLE(s);
computeSymbolStyle(&s,style,symbol,scalefactor);
+ s.style = style;
if(symbol->type == MS_SYMBOL_TRUETYPE) {
if(!symbol->full_font_path)
symbol->full_font_path = strdup(msLookupHashTable(&(symbolset->fontset->fonts),
@@ -540,8 +542,9 @@
goto cleanup;
}
+ INIT_SYMBOL_STYLE(s);
computeSymbolStyle(&s,style,symbol,scalefactor);
-
+ s.style = style;
if (!s.color && !s.outlinecolor && symbol->type != MS_SYMBOL_PIXMAP) {
ret = MS_SUCCESS; // nothing to do (colors are required except for PIXMAP symbols
@@ -617,8 +620,9 @@
}
break;
}
+ s.style = style;
computeSymbolStyle(&s,style,symbol,scalefactor);
-
+ s.style = style;
if (!s.color && !s.outlinecolor && symbol->type != MS_SYMBOL_PIXMAP)
return MS_SUCCESS; // nothing to do if no color, except for pixmap symbols
More information about the mapserver-commits
mailing list