warn if non bitmap (svg) files are used for pattern symbolizers as this is not currently supported - refs #1010 and #1045

This commit is contained in:
Dane Springmeyer 2012-02-01 12:27:57 -08:00
parent 915addc51d
commit cf8e036574
2 changed files with 14 additions and 2 deletions

View file

@ -62,7 +62,13 @@ void agg_renderer<T>::process(line_pattern_symbolizer const& sym,
std::string filename = path_processor_type::evaluate( *sym.get_filename(), feature);
boost::optional<marker_ptr> mark = marker_cache::instance()->find(filename,true);
if (!mark || !(*mark)->is_bitmap()) return;
if (!mark) return;
if (!(*mark)->is_bitmap())
{
std::clog << "### Warning only images (not '" << filename << "') are supported in the line_pattern_symbolizer\n";
return;
}
boost::optional<image_ptr> pat = (*mark)->get_bitmap_data();

View file

@ -103,7 +103,13 @@ void agg_renderer<T>::process(polygon_pattern_symbolizer const& sym,
std::clog << "### Warning: file not found: " << filename << "\n";
}
if (!marker || !(*marker)->is_bitmap()) return;
if (!marker) return;
if (!(*marker)->is_bitmap())
{
std::clog << "### Warning only images (not '" << filename << "') are supported in the polygon_pattern_symbolizer\n";
return;
}
boost::optional<image_ptr> pat = (*marker)->get_bitmap_data();