From b8511eca6527a0ef21f50bc3f19543c7f6a7b884 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 3 Mar 2010 03:26:12 +0000 Subject: [PATCH] restore default behavior of PointSymbolizer when used without an image, by defaulting to 4x4 black pixel - TODO - expose colors, shapes, and size for this in the future --- src/agg_renderer.cpp | 13 ++++++++++++- src/cairo_renderer.cpp | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/agg_renderer.cpp b/src/agg_renderer.cpp index 7f25dd42b..4c3c8d55e 100644 --- a/src/agg_renderer.cpp +++ b/src/agg_renderer.cpp @@ -433,8 +433,19 @@ void agg_renderer::process(point_symbolizer const& sym, double z=0; std::string filename = path_processor_type::evaluate( *sym.get_filename(), feature); - boost::optional data = mapnik::image_cache::instance()->find(filename,true); + boost::optional data; + if ( filename.empty() ) + { + // default OGC 4x4 black pixel + data = boost::optional(new image_data_32(4,4)); + (*data)->set(0xff000000); + } + else + { + data = mapnik::image_cache::instance()->find(filename,true); + } + if ( data ) { for (unsigned i=0;i data = mapnik::image_cache::instance()->find(filename,true); + boost::optional data; + + if ( filename.empty() ) + { + // default OGC 4x4 black pixel + data = boost::optional(new image_data_32(4,4)); + (*data)->set(0xff000000); + } + else + { + data = mapnik::image_cache::instance()->find(filename,true); + } if ( data ) {