From f2b795af0bc5dd3a305c8111fb17fd759b2f4925 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 6 Mar 2013 21:30:02 +0000 Subject: [PATCH] + skip SEG_CLOSE commands as they not used to transfer x/y --- include/mapnik/geom_util.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mapnik/geom_util.hpp b/include/mapnik/geom_util.hpp index f8a676b35..36f030174 100644 --- a/include/mapnik/geom_util.hpp +++ b/include/mapnik/geom_util.hpp @@ -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