mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
+ skip SEG_CLOSE commands as they not used to transfer x/y
This commit is contained in:
parent
6ffe78c300
commit
f2b795af0b
@ -425,6 +425,7 @@ bool hit_test(PathType & path, double x, double y, double tol)
|
||||
unsigned count = 0;
|
||||
while (SEG_END != (command = path.vertex(&x1, &y1)))
|
||||
{
|
||||
if (command == SEG_CLOSE) continue;
|
||||
++count;
|
||||
if (command == SEG_MOVETO)
|
||||
{
|
||||
@ -472,6 +473,8 @@ bool interior_position(PathType & path, double & x, double & y)
|
||||
double y1 = 0;
|
||||
while (SEG_END != (command = path.vertex(&x1, &y1)))
|
||||
{
|
||||
if (command == SEG_CLOSE)
|
||||
continue;
|
||||
if (command != SEG_MOVETO)
|
||||
{
|
||||
// if the segments overlap
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user