[mapnik-vector-tile] 07/07: Update clipper to ac8d6bf2517f46c05647b5c19cac113fb180ffb4.
Bas Couwenberg
sebastic at debian.org
Fri Aug 5 20:57:47 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository mapnik-vector-tile.
commit 8971207023eb14224cd6575c09637cf162d412f4
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Aug 5 22:20:51 2016 +0200
Update clipper to ac8d6bf2517f46c05647b5c19cac113fb180ffb4.
---
debian/changelog | 1 +
debian/clipper.cpp | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 92 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8246f10..d9c075a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ mapnik-vector-tile (1.2.1+dfsg-1) UNRELEASED; urgency=medium
* New upstream release.
* Enable verbose gyp output.
* Bump minimum required Mapnik to 3.0.12.
+ * Update clipper to ac8d6bf2517f46c05647b5c19cac113fb180ffb4.
-- Bas Couwenberg <sebastic at debian.org> Fri, 05 Aug 2016 22:19:20 +0200
diff --git a/debian/clipper.cpp b/debian/clipper.cpp
index 2cd7102..5f4ac4d 100644
--- a/debian/clipper.cpp
+++ b/debian/clipper.cpp
@@ -704,6 +704,28 @@ void IntersectPoint(TEdge &Edge1, TEdge &Edge2, IntPoint &ip)
y1 = std::ceil(((ip.x - 0.5) / Edge1.Dx + by1) - 0.5);
}
}
+ else if (Edge1.Bot.y > ip.y)
+ {
+ if (Edge2.Bot.y >= Edge1.Bot.y)
+ {
+ y1 = Edge1.Bot.y;
+ }
+ else
+ {
+ y1 = Edge2.Bot.y;
+ }
+ }
+ else if (Edge1.Bot.y < ip.y)
+ {
+ if (Edge2.Bot.y <= Edge1.Bot.y)
+ {
+ y1 = Edge1.Bot.y;
+ }
+ else
+ {
+ y1 = Edge2.Bot.y;
+ }
+ }
if (ip.y >= Edge1.Bot.y && y1 < Edge1.Bot.y) y1 = Edge1.Bot.y;
else if (ip.y <= Edge1.Bot.y && y1 > Edge1.Bot.y) y1 = Edge1.Bot.y;
if (Edge2.Bot.x > ip.x)
@@ -728,6 +750,28 @@ void IntersectPoint(TEdge &Edge1, TEdge &Edge2, IntPoint &ip)
y2 = std::ceil(((ip.x - 0.5) / Edge2.Dx + by2) - 0.5);
}
}
+ else if (Edge2.Bot.y > ip.y)
+ {
+ if (Edge1.Bot.y >= Edge2.Bot.y)
+ {
+ y2 = Edge2.Bot.y;
+ }
+ else
+ {
+ y2 = Edge1.Bot.y;
+ }
+ }
+ else if (Edge2.Bot.y < ip.y)
+ {
+ if (Edge1.Bot.y <= Edge2.Bot.y)
+ {
+ y2 = Edge2.Bot.y;
+ }
+ else
+ {
+ y2 = Edge1.Bot.y;
+ }
+ }
if (ip.y >= Edge2.Bot.y && y2 < Edge2.Bot.y) y2 = Edge2.Bot.y;
else if (ip.y <= Edge2.Bot.y && y2 > Edge2.Bot.y) y2 = Edge2.Bot.y;
cInt x1 = ip.x;
@@ -754,6 +798,28 @@ void IntersectPoint(TEdge &Edge1, TEdge &Edge2, IntPoint &ip)
x1 = std::ceil(((ip.y - 0.5) * Edge1.Dx + bx1) - 0.5);
}
}
+ else if (Edge1.Bot.x > ip.x)
+ {
+ if (Edge2.Bot.x >= Edge1.Bot.x)
+ {
+ x1 = Edge1.Bot.x;
+ }
+ else
+ {
+ x1 = Edge2.Bot.x;
+ }
+ }
+ else if (Edge1.Bot.x < ip.x)
+ {
+ if (Edge2.Bot.x <= Edge1.Bot.x)
+ {
+ x1 = Edge1.Bot.x;
+ }
+ else
+ {
+ x1 = Edge2.Bot.x;
+ }
+ }
if (ip.x >= Edge1.Bot.x && x1 < Edge1.Bot.x) x1 = Edge1.Bot.x;
else if (ip.x <= Edge1.Bot.x && x1 > Edge1.Bot.x) x1 = Edge1.Bot.x;
if (Edge2.Bot.y > ip.y)
@@ -778,6 +844,28 @@ void IntersectPoint(TEdge &Edge1, TEdge &Edge2, IntPoint &ip)
x2 = std::ceil(((ip.y - 0.5) * Edge2.Dx + bx2) - 0.5);
}
}
+ else if (Edge2.Bot.x > ip.x)
+ {
+ if (Edge1.Bot.x >= Edge2.Bot.x)
+ {
+ x2 = Edge2.Bot.x;
+ }
+ else
+ {
+ x2 = Edge1.Bot.x;
+ }
+ }
+ else if (Edge2.Bot.x < ip.x)
+ {
+ if (Edge1.Bot.x <= Edge2.Bot.x)
+ {
+ x2 = Edge2.Bot.x;
+ }
+ else
+ {
+ x2 = Edge1.Bot.x;
+ }
+ }
if (ip.x >= Edge2.Bot.x && x2 < Edge2.Bot.x) x2 = Edge2.Bot.x;
else if (ip.x <= Edge2.Bot.x && x2 > Edge2.Bot.x) x2 = Edge2.Bot.x;
if (y1 > ip.y && y2 > ip.y)
@@ -3469,6 +3557,7 @@ int PointCount(OutPt *Pts)
while (p != Pts);
return result;
}
+
//------------------------------------------------------------------------------
void Clipper::BuildResult(Paths &polys)
@@ -4643,7 +4732,7 @@ bool Clipper::FindIntersectLoop(std::unordered_multimap<int, OutPtIntersect> & d
range = dupeRec.equal_range(idx_search);
visited.insert(idx_search);
// Check for connection through chain of other intersections
- for (auto it = range.first; it != range.second; ++it)
+ for (auto it = range.first; it != range.second && it != dupeRec.end() && it->first == idx_search; ++it)
{
OutRec * itRec = GetOutRec(it->second.op2->Idx);
if (visited.count(itRec->Idx) > 0 ||
@@ -4741,7 +4830,7 @@ bool Clipper::FixIntersects(std::unordered_multimap<int, OutPtIntersect> & dupeR
std::set<int> visited;
visited.insert(outRec_search->Idx);
// Check for connection through chain of other intersections
- for (auto it = range.first; it != range.second; ++it)
+ for (auto it = range.first; it != range.second && it != dupeRec.end() && it->first == outRec_search->Idx; ++it)
{
OutRec * itRec = GetOutRec(it->second.op2->Idx);
if (itRec->Idx != outRec_search->Idx &&
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapnik-vector-tile.git
More information about the Pkg-grass-devel
mailing list