mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Make indent, and finish writing a comment that I started
This commit is contained in:
+10
-4
@@ -302,9 +302,6 @@ static void decode_clipped(ClipperLib::PolyNode *t, drawvec &out) {
|
|||||||
// guaranteed that at least one point in the polygon is strictly
|
// guaranteed that at least one point in the polygon is strictly
|
||||||
// inside its parent (not on one of its boundary lines).
|
// inside its parent (not on one of its boundary lines).
|
||||||
|
|
||||||
// Once we have that, we can run through the outer rings that have
|
|
||||||
// an even number of parents,
|
|
||||||
|
|
||||||
std::vector<ring> rings;
|
std::vector<ring> rings;
|
||||||
decode_rings(t, rings);
|
decode_rings(t, rings);
|
||||||
std::sort(rings.begin(), rings.end());
|
std::sort(rings.begin(), rings.end());
|
||||||
@@ -319,10 +316,15 @@ static void decode_clipped(ClipperLib::PolyNode *t, drawvec &out) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nextring:
|
nextring:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Then reverse the winding order of any rings that turned out
|
||||||
|
// to actually be inner when they are outer, or vice versa.
|
||||||
|
// (A ring is outer if it has no parent or if its parent is
|
||||||
|
// an inner ring.)
|
||||||
|
|
||||||
for (size_t ii = rings.size(); ii > 0; ii--) {
|
for (size_t ii = rings.size(); ii > 0; ii--) {
|
||||||
size_t i = ii - 1;
|
size_t i = ii - 1;
|
||||||
|
|
||||||
@@ -339,6 +341,10 @@ nextring:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Then run through the rings again, outputting each outer ring
|
||||||
|
// followed by its direct children, and checking to make sure
|
||||||
|
// there are no child rings whose parents weren't identified.
|
||||||
|
|
||||||
for (size_t ii = rings.size(); ii > 0; ii--) {
|
for (size_t ii = rings.size(); ii > 0; ii--) {
|
||||||
size_t i = ii - 1;
|
size_t i = ii - 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user