()
| 2411 | ring = []; |
| 2412 | } |
| 2413 | function ringEnd() { |
| 2414 | pointRing(ring[0][0], ring[0][1]); |
| 2415 | ringListener.lineEnd(); |
| 2416 | var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length; |
| 2417 | if (!n) { |
| 2418 | invisible = true; |
| 2419 | invisibleArea += d3_geo_clipAreaRing(ring, -1); |
| 2420 | ring = null; |
| 2421 | return; |
| 2422 | } |
| 2423 | ring = null; |
| 2424 | if (clean & 1) { |
| 2425 | segment = ringSegments[0]; |
| 2426 | visibleArea += d3_geo_clipAreaRing(segment, 1); |
| 2427 | var n = segment.length - 1, i = -1, point; |
| 2428 | listener.lineStart(); |
| 2429 | while (++i < n) listener.point((point = segment[i])[0], point[1]); |
| 2430 | listener.lineEnd(); |
| 2431 | return; |
| 2432 | } |
| 2433 | if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); |
| 2434 | segments.push(ringSegments.filter(d3_geo_clipSegmentLength1)); |
| 2435 | } |
| 2436 | return clip; |
| 2437 | }; |
| 2438 | } |
nothing calls this directly
no test coverage detected