added check for num_points in line/polygon symbolizers:

1. don't bother with line_symbolizer unless at least 2 points
2. at least 3 points for polygon_symbolizer
This commit is contained in:
Artem Pavlenko 2006-01-31 17:35:18 +00:00
parent 6b7d874ff3
commit c97fb0bf57
2 changed files with 2 additions and 2 deletions

View file

@ -61,7 +61,7 @@ namespace mapnik
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
geometry_ptr const& geom=feat.get_geometry();
if (geom)
if (geom && geom->num_points() > 1)
{
path_type path(t,*geom);
agg::row_ptr_cache<agg::int8u> buf(image.raw_data(),image.width(),image.height(),

View file

@ -46,7 +46,7 @@ namespace mapnik
typedef agg::renderer_scanline_aa_solid<ren_base> renderer;
geometry_ptr const& geom=feat.get_geometry();
if (geom)
if (geom && geom->num_points() > 2)
{
path_type path(t,*geom);
agg::row_ptr_cache<agg::int8u> buf(image.raw_data(),image.width(),image.height(),