[mapserver-commits] r9874 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Feb 23 09:37:45 EST 2010
Author: theduckylittle
Date: 2010-02-23 09:37:43 -0500 (Tue, 23 Feb 2010)
New Revision: 9874
Modified:
trunk/mapserver/Makefile.in
trunk/mapserver/configure
trunk/mapserver/configure.in
trunk/mapserver/mapagg.cpp
Log:
Fix to make AGG Symbols Optional, Added detection to add -lexpat when necessary, Put in better error handling for bad SVG files. (#3344)
Modified: trunk/mapserver/Makefile.in
===================================================================
--- trunk/mapserver/Makefile.in 2010-02-23 05:06:40 UTC (rev 9873)
+++ trunk/mapserver/Makefile.in 2010-02-23 14:37:43 UTC (rev 9874)
@@ -72,6 +72,7 @@
AGG= @AGG_ENABLED@
AGG_INC= @AGG_INC@
AGG_OBJ= @AGG_OBJ@
+AGG_LIB= @AGG_LIB@
#
# Optional Opengl Support.
Modified: trunk/mapserver/configure
===================================================================
--- trunk/mapserver/configure 2010-02-23 05:06:40 UTC (rev 9873)
+++ trunk/mapserver/configure 2010-02-23 14:37:43 UTC (rev 9874)
@@ -309,7 +309,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC XTRALIBS CPP EGREP C_PIC STRINGS MS_VERSION PKG_CONFIG FT_BIN ZLIB_ENABLED ZLIB_INC ZLIB_LIB JPEG_ENABLED JPEG_INC JPEG_LIB ICONV_ENABLED ICONV_INC ICONV_LIB GD_DEF GD_INC GD_LIB GD_STATIC MAKE_GD MAKE_GD_CLEAN PDF_ENABLED PDF_INC PDF_LIB FTGL_ENABLED FTGL_INC FTGL_LIB OGL_ENABLED OGL_INC OGL_LIB AGG_ENABLED AGG_INC AGG_OBJ RGBA_PNG_ENABLED PNG_INC PNG_LIB EPPL_ENABLED EPPL_OBJ PROJ_ENABLED PROJ_INC PROJ_LIBS THREAD_FLAG THREAD_LIB SDE_ENABLED SDE_INC SDE_LIB GEOS_CONFIG GEOS_ENABLED GEOS_INC GEOS_LIB GDAL_CONFIG GDAL_ENABLED OGR_ENABLED GDAL_INC GDAL_LIB TIFF_ENABLED TIFF_INC TIFF_LIB PG_CONFIG POSTGIS_ENABLED POSTGIS_INC POSTGIS_LIB MY_CONFIG MYGIS_ENABLED MYGIS_INC MYGIS_LIB ORACLESPATIAL_ENABLED ORACLESPATIAL_INC ORACLESPATIAL_LIB MING_ENABLED MING_INC MING_LIB WMS_SVR_ENABLED WFS_SVR_ENABLED WCS_SVR_ENABLED LIBCURL_CONFIG CURL_INC CURL_LIB LIBXML2_CONFIG XML2_INC XML2_LIB WMS_LYR_ENABLED WFS_LYR_ENABLED SOS_SVR_ENABLED XSLT_ENABLED XSLT_INC XSLT_LIB EXSLT_ENABLED EXSLT_INC EXSLT_LIB FRIBIDI_CONFIG FRIBIDI_ENABLED FRIBIDI_INC FRIBIDI_LIB CAIRO_ENABLED CAIRO_INC CAIRO_LIB FASTCGI_ENABLED FASTCGI_INC FASTCGI_LIB HTTPD MS_INC MS_LIB IGNORE_MISSING_DATA USE_POINT_Z_M USE_NINT DEBUG_FLAGS LD_SHARED SO_EXT SO_COMMAND_NAME PHP_LD_SHARED PHP_VERSION_FLAG PHP_SRC_DIR PHP_CC PHP_LD PHP_REGEX_INC PHP_REGEX_OBJ USE_PHP_REGEX MAKE_PHPMS MAKE_PHPMS_CLEAN APACHE_INC OS_INCLUDE_DIR ALL_ENABLED ALL_INC ALL_LIB ALL_STATIC_LIB RPATHS LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX RANLIB ac_ct_RANLIB LEX LEXLIB LEX_OUTPUT_ROOT YACC XTRALIBS CPP EGREP C_PIC STRINGS MS_VERSION PKG_CONFIG FT_BIN ZLIB_ENABLED ZLIB_INC ZLIB_LIB JPEG_ENABLED JPEG_INC JPEG_LIB ICONV_ENABLED ICONV_INC ICONV_LIB GD_DEF GD_INC GD_LIB GD_STATIC MAKE_GD MAKE_GD_CLEAN PDF_ENABLED PDF_INC PDF_LIB FTGL_ENABLED FTGL_INC FTGL_LIB OGL_ENABLED OGL_INC OGL_LIB AGG_ENABLED AGG_INC AGG_OBJ AGG_LIB RGBA_PNG_ENABLED PNG_INC PNG_LIB EPPL_ENABLED EPPL_OBJ PROJ_ENABLED PROJ_INC PROJ_LIBS THREAD_FLAG THREAD_LIB SDE_ENABLED SDE_INC SDE_LIB GEOS_CONFIG GEOS_ENABLED GEOS_INC GEOS_LIB GDAL_CONFIG GDAL_ENABLED OGR_ENABLED GDAL_INC GDAL_LIB TIFF_ENABLED TIFF_INC TIFF_LIB PG_CONFIG POSTGIS_ENABLED POSTGIS_INC POSTGIS_LIB MY_CONFIG MYGIS_ENABLED MYGIS_INC MYGIS_LIB ORACLESPATIAL_ENABLED ORACLESPATIAL_INC ORACLESPATIAL_LIB MING_ENABLED MING_INC MING_LIB WMS_SVR_ENABLED WFS_SVR_ENABLED WCS_SVR_ENABLED LIBCURL_CONFIG CURL_INC CURL_LIB LIBXML2_CONFIG XML2_INC XML2_LIB WMS_LYR_ENABLED WFS_LYR_ENABLED SOS_SVR_ENABLED XSLT_ENABLED XSLT_INC XSLT_LIB EXSLT_ENABLED EXSLT_INC EXSLT_LIB FRIBIDI_CONFIG FRIBIDI_ENABLED FRIBIDI_INC FRIBIDI_LIB CAIRO_ENABLED CAIRO_INC CAIRO_LIB FASTCGI_ENABLED FASTCGI_INC FASTCGI_LIB HTTPD MS_INC MS_LIB IGNORE_MISSING_DATA USE_POINT_Z_M USE_NINT DEBUG_FLAGS LD_SHARED SO_EXT SO_COMMAND_NAME PHP_LD_SHARED PHP_VERSION_FLAG PHP_SRC_DIR PHP_CC PHP_LD PHP_REGEX_INC PHP_REGEX_OBJ USE_PHP_REGEX MAKE_PHPMS MAKE_PHPMS_CLEAN APACHE_INC OS_INCLUDE_DIR ALL_ENABLED ALL_INC ALL_LIB ALL_STATIC_LIB RPATHS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -891,6 +891,8 @@
--with-ftgl[=DIR] Include OpenGl support (DIR is OpenGL's install dir).
--with-opengl[=DIR] Include OpenGl support (DIR is OpenGL's install dir).
--with-agg[=DIR] Include AGG support (DIR is AGG's install dir).
+ --with-arg-svg-symbols[=yes/no]
+ Include AGG SVG symbol support (Requires expat).
--with-experimental-png Include experimental palette support for rgba png.
--without-eppl Disable EPPL7 support.
--with-eppl Include EPPL7 support.
@@ -9154,6 +9156,12 @@
fi;
+# Check whether --with-agg-svg-symbols or --without-agg-svg-symbols was given.
+if test "${with_agg_svg_symbols+set}" = set; then
+ withval="$with_agg_svg_symbols"
+
+fi;
+
if test "$with_agg" != "no" ; then
if test -z "$FT_BIN" ; then
@@ -9218,7 +9226,14 @@
AGG_ENABLED="-DUSE_AGG"
AGG_INC="$FT_INC -Irenderers/agg/include"
# AGG_OBJ="renderers/agg/src/agg_arc.o renderers/agg/src/agg_arrowhead.o renderers/agg/src/agg_bezier_arc.o renderers/agg/src/agg_bspline.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_markers_term.o renderers/agg/src/agg_vcgen_smooth_poly1.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_vcgen_bspline.o renderers/agg/src/agg_gsv_text.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_rounded_rect.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_trans_warp_magnifier.o renderers/agg/src/agg_trans_single_path.o renderers/agg/src/agg_trans_double_path.o renderers/agg/src/agg_vpgen_clip_polygon.o renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_vpgen_segmentator.o renderers/agg/src/agg_font_freetype.o"
- AGG_OBJ="renderers/agg/src/agg_arc.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_vpgen_clip_polygon.o renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o renderers/agg/src/agg_svg_parser.o renderers/agg/src/agg_svg_path_renderer.o renderers/agg/src/agg_svg_path_tokenizer.o"
+
+ AGG_OBJ="renderers/agg/src/agg_arc.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_vpgen_clip_polygon.o renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o"
+
+ if test "$with_agg_svg_symbols" != "no" ; then
+ AGG_OBJ="$AGG_OBJ renderers/agg/src/agg_svg_parser.o renderers/agg/src/agg_svg_path_renderer.o renderers/agg/src/agg_svg_path_tokenizer.o"
+ AGG_LIB=" -lexpat"
+ AGG_SVG_SYMBOLS_ENABLED="-DUSE_AGG_SVG_SYMBOLS"
+ fi
else
echo "$as_me:$LINENO: result: no" >&5
@@ -9232,12 +9247,14 @@
AGG_OBJ=$AGG_OBJ
+AGG_LIB=$AGG_LIB
-ALL_ENABLED="$AGG_ENABLED $ALL_ENABLED"
+
+
+ALL_ENABLED="$AGG_ENABLED $AGG_SVG_SYMBOLS_ENABLED $ALL_ENABLED"
ALL_INC="$AGG_INC $ALL_INC"
-
echo "$as_me:$LINENO: checking if RGBA palette png support requested" >&5
echo $ECHO_N "checking if RGBA palette png support requested... $ECHO_C" >&6
@@ -14311,6 +14328,7 @@
s, at AGG_ENABLED@,$AGG_ENABLED,;t t
s, at AGG_INC@,$AGG_INC,;t t
s, at AGG_OBJ@,$AGG_OBJ,;t t
+s, at AGG_LIB@,$AGG_LIB,;t t
s, at RGBA_PNG_ENABLED@,$RGBA_PNG_ENABLED,;t t
s, at PNG_INC@,$PNG_INC,;t t
s, at PNG_LIB@,$PNG_LIB,;t t
@@ -14705,8 +14723,8 @@
echo "${ECHO_T} jpeg support: ${JPEG_ENABLED}" >&6
echo "$as_me:$LINENO: result: iconv support: ${ICONV_ENABLED}" >&5
echo "${ECHO_T} iconv support: ${ICONV_ENABLED}" >&6
-echo "$as_me:$LINENO: result: AGG support: ${AGG_ENABLED}" >&5
-echo "${ECHO_T} AGG support: ${AGG_ENABLED}" >&6
+echo "$as_me:$LINENO: result: AGG support: ${AGG_ENABLED} ${AGG_SVG_SYMBOLS_ENABLED}" >&5
+echo "${ECHO_T} AGG support: ${AGG_ENABLED} ${AGG_SVG_SYMBOLS_ENABLED}" >&6
echo "$as_me:$LINENO: result: Cairo (SVG,PDF) support: ${CAIRO_ENABLED}" >&5
echo "${ECHO_T} Cairo (SVG,PDF) support: ${CAIRO_ENABLED}" >&6
echo "$as_me:$LINENO: result: Ming(flash) support: ${MING_ENABLED}" >&5
Modified: trunk/mapserver/configure.in
===================================================================
--- trunk/mapserver/configure.in 2010-02-23 05:06:40 UTC (rev 9873)
+++ trunk/mapserver/configure.in 2010-02-23 14:37:43 UTC (rev 9874)
@@ -961,6 +961,9 @@
AC_MSG_CHECKING(if AGG support requested)
AC_ARG_WITH(agg,
[ --with-agg[[=DIR]] Include AGG support (DIR is AGG's install dir).],,)
+AC_ARG_WITH(agg-svg-symbols,
+[ --with-arg-svg-symbols[[=yes/no]]
+ Include AGG SVG symbol support (Requires expat).],,)
if test "$with_agg" != "no" ; then
@@ -982,7 +985,15 @@
AGG_ENABLED="-DUSE_AGG"
AGG_INC="$FT_INC -Irenderers/agg/include"
# AGG_OBJ="renderers/agg/src/agg_arc.o renderers/agg/src/agg_arrowhead.o renderers/agg/src/agg_bezier_arc.o renderers/agg/src/agg_bspline.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_markers_term.o renderers/agg/src/agg_vcgen_smooth_poly1.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_vcgen_bspline.o renderers/agg/src/agg_gsv_text.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_rounded_rect.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_trans_warp_magnifier.o renderers/agg/src/agg_trans_single_path.o renderers/agg/src/agg_trans_double_path.o renderers/agg/src/agg_vpgen_clip_polygon.o renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_vpgen_segmentator.o renderers/agg/src/agg_font_freetype.o"
- AGG_OBJ="renderers/agg/src/agg_arc.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_vpgen_clip_polygon.o renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o renderers/agg/src/agg_svg_parser.o renderers/agg/src/agg_svg_path_renderer.o renderers/agg/src/agg_svg_path_tokenizer.o"
+
+ AGG_OBJ="renderers/agg/src/agg_arc.o renderers/agg/src/agg_curves.o renderers/agg/src/agg_vcgen_contour.o renderers/agg/src/agg_vcgen_dash.o renderers/agg/src/agg_vcgen_stroke.o renderers/agg/src/agg_image_filters.o renderers/agg/src/agg_line_aa_basics.o renderers/agg/src/agg_line_profile_aa.o renderers/agg/src/agg_sqrt_tables.o renderers/agg/src/agg_embedded_raster_fonts.o renderers/agg/src/agg_trans_affine.o renderers/agg/src/agg_vpgen_clip_polygon.o renderers/agg/src/agg_vpgen_clip_polyline.o renderers/agg/src/agg_font_freetype.o"
+
+ if test "$with_agg_svg_symbols" != "no" ; then
+ dnl add SVG to the AGG build
+ AGG_OBJ="$AGG_OBJ renderers/agg/src/agg_svg_parser.o renderers/agg/src/agg_svg_path_renderer.o renderers/agg/src/agg_svg_path_tokenizer.o"
+ AGG_LIB=" -lexpat"
+ AGG_SVG_SYMBOLS_ENABLED="-DUSE_AGG_SVG_SYMBOLS"
+ fi
else
AC_MSG_RESULT([no])
@@ -992,11 +1003,12 @@
AC_SUBST(AGG_ENABLED,$AGG_ENABLED)
AC_SUBST(AGG_INC, $AGG_INC)
AC_SUBST(AGG_OBJ, $AGG_OBJ)
+AC_SUBST(AGG_LIB, $AGG_LIB)
-ALL_ENABLED="$AGG_ENABLED $ALL_ENABLED"
+
+ALL_ENABLED="$AGG_ENABLED $AGG_SVG_SYMBOLS_ENABLED $ALL_ENABLED"
ALL_INC="$AGG_INC $ALL_INC"
-
dnl ---------------------------------------------------------------------
dnl Optional RGBA palette png output
dnl ---------------------------------------------------------------------
@@ -2852,7 +2864,7 @@
AC_MSG_RESULT([ palette rgba png support: ${RGBA_PNG_ENABLED}])
AC_MSG_RESULT([ jpeg support: ${JPEG_ENABLED}])
AC_MSG_RESULT([ iconv support: ${ICONV_ENABLED}])
-AC_MSG_RESULT([ AGG support: ${AGG_ENABLED}])
+AC_MSG_RESULT([ AGG support: ${AGG_ENABLED} ${AGG_SVG_SYMBOLS_ENABLED}])
AC_MSG_RESULT([ Cairo (SVG,PDF) support: ${CAIRO_ENABLED}])
AC_MSG_RESULT([ Ming(flash) support: ${MING_ENABLED}])
AC_MSG_RESULT([ PDFLib support: ${PDF_ENABLED}])
Modified: trunk/mapserver/mapagg.cpp
===================================================================
--- trunk/mapserver/mapagg.cpp 2010-02-23 05:06:40 UTC (rev 9873)
+++ trunk/mapserver/mapagg.cpp 2010-02-23 14:37:43 UTC (rev 9874)
@@ -79,7 +79,9 @@
#include "renderers/agg/include/agg_renderer_raster_text.h"
#include "renderers/agg/include/agg_embedded_raster_fonts.h"
+#ifdef USE_AGG_SVG_SYMBOLS
#include "renderers/agg/include/agg_svg_parser.h"
+#endif
#define LINESPACE 1.33 //space beween text lines... from GD
#define _EPSILON 0.00001 //used for double equality testing
@@ -221,7 +223,8 @@
* using the scale parameter.
* TODO: Create a cache for the various symbol sizes.
*/
-static GDpixfmt loadSymbolSVG(symbolObj *sym, double scale) {
+static int loadSymbolSVG(symbolObj *sym, double scale, GDpixfmt &gdpix) {
+#ifdef USE_AGG_SVG_SYMBOLS
/* setup the SVG tools */
mapserver::svg::path_renderer m_path;
mapserver::svg::parser p(m_path);
@@ -235,7 +238,7 @@
} catch(mapserver::svg::exception err) {
/* throw an error if we get one from parsing the SVG file */
msSetError(MS_IOERR, err.msg(), "loadSymbolSVG()");
- exit(-1); /* TODO: This should probably not be "exit" */
+ return MS_FAILURE; /* TODO: This should probably not be "exit" */
}
/* get the size */
@@ -271,7 +274,12 @@
delete [] im_data;
- return pixf;
+ gdpix = pixf;
+ return MS_SUCCESS;
+#else
+ msSetError(MS_IOERR, "SVG Symbol Support has not been compiled in, recompile with --with-agg-svg-symbols<br>\n", "loadSymbolSVG()");
+ return MS_FAILURE;
+#endif
}
@@ -1151,10 +1159,12 @@
return;
}
case(MS_SYMBOL_SVG): {
- GDpixfmt img_pixf=loadSymbolSVG(symbol, size);
- ren->renderPathSolid(circle,agg_bcolor,AGG_NO_COLOR,width);
- ren->renderPathTiledPixmapBGRA(circle,img_pixf);
- ren->renderPathSolid(circle,AGG_NO_COLOR,agg_ocolor,width);
+ GDpixfmt img_pixf;
+ if(loadSymbolSVG(symbol, size, img_pixf)) {
+ ren->renderPathSolid(circle,agg_bcolor,AGG_NO_COLOR,width);
+ ren->renderPathTiledPixmapBGRA(circle,img_pixf);
+ ren->renderPathSolid(circle,AGG_NO_COLOR,agg_ocolor,width);
+ }
}
break;
case(MS_SYMBOL_PIXMAP): {
@@ -1312,8 +1322,10 @@
break;
case(MS_SYMBOL_SVG): {
/* scaling size is better done in the vector ops of the SVG */
- GDpixfmt buffer = loadSymbolSVG(symbol, style->size);
- ren->renderPixmapBGRA(buffer, p->x,p->y, angle_radians, 1.0);
+ GDpixfmt buffer;
+ if(loadSymbolSVG(symbol, style->size, buffer) == MS_SUCCESS) {
+ ren->renderPixmapBGRA(buffer, p->x,p->y, angle_radians, 1.0);
+ }
}
break;
case(MS_SYMBOL_PIXMAP): {
@@ -1412,7 +1424,9 @@
img_pixf = loadSymbolPixmap(symbol);
}
else if(symbol->type==MS_SYMBOL_SVG) {
- img_pixf = loadSymbolSVG(symbol, d);
+ if(loadSymbolSVG(symbol, d, img_pixf) == MS_FAILURE) {
+ return;
+ }
}
else if(symbol->type==MS_SYMBOL_VECTOR) {
if(style->angle != 0.0 && style->angle != 360.0) {
@@ -1757,8 +1771,10 @@
else { // from here on, the symbol is treated as a brush for the line
switch(symbol->type) {
case MS_SYMBOL_SVG: {
- GDpixfmt img_pixf = loadSymbolSVG(symbol, size);
- ren->renderPathPixmapBGRA(*lines,img_pixf);
+ GDpixfmt img_pixf;
+ if(loadSymbolSVG(symbol, size, img_pixf) == MS_SUCCESS) {
+ ren->renderPathPixmapBGRA(*lines,img_pixf);
+ }
}
break;
case MS_SYMBOL_PIXMAP: {
@@ -1983,10 +1999,12 @@
}
break;
case MS_SYMBOL_SVG: {
- GDpixfmt img_pixf = loadSymbolSVG(symbol, size);
- ren->renderPathSolid(*polygons,agg_bcolor,agg_bcolor,1);
- ren->renderPathTiledPixmapBGRA(*polygons,img_pixf);
- ren->renderPathSolid(*polygons,AGG_NO_COLOR,agg_ocolor,width);
+ GDpixfmt img_pixf;
+ if(loadSymbolSVG(symbol, size, img_pixf) == MS_SUCCESS) {
+ ren->renderPathSolid(*polygons,agg_bcolor,agg_bcolor,1);
+ ren->renderPathTiledPixmapBGRA(*polygons,img_pixf);
+ ren->renderPathSolid(*polygons,AGG_NO_COLOR,agg_ocolor,width);
+ }
}
break;
case MS_SYMBOL_PIXMAP: {
More information about the mapserver-commits
mailing list