fix agg::conv_clip_polygon validation
This commit is contained in:
parent
e1941f87f0
commit
435f329cef
1 changed files with 5 additions and 0 deletions
|
@ -93,6 +93,7 @@ public:
|
|||
extent_.maxy());
|
||||
unsigned cmd;
|
||||
double x,y;
|
||||
clipped.rewind(0);
|
||||
mapnik::geometry_type geom2(mapnik::geometry_type::types::Polygon);
|
||||
while ((cmd = clipped.vertex(&x, &y)) != mapnik::SEG_END) {
|
||||
geom2.push_vertex(x,y,(mapnik::CommandType)cmd);
|
||||
|
@ -130,6 +131,10 @@ public:
|
|||
extent_.maxy());
|
||||
unsigned cmd;
|
||||
double x,y;
|
||||
// NOTE: this rewind is critical otherwise
|
||||
// agg_conv_adapter_vpgen will give garbage
|
||||
// values for the first vertex
|
||||
clipped.rewind(0);
|
||||
while ((cmd = clipped.vertex(&x, &y)) != mapnik::SEG_END) {
|
||||
count++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue