(x, y)
| 2725 | if (v_) listener.lineEnd(); |
| 2726 | } |
| 2727 | function linePoint(x, y) { |
| 2728 | x = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, x)); |
| 2729 | y = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, y)); |
| 2730 | var v = visible(x, y); |
| 2731 | if (polygon) ring.push([ x, y ]); |
| 2732 | if (first) { |
| 2733 | x__ = x, y__ = y, v__ = v; |
| 2734 | first = false; |
| 2735 | if (v) { |
| 2736 | listener.lineStart(); |
| 2737 | listener.point(x, y); |
| 2738 | } |
| 2739 | } else { |
| 2740 | if (v && v_) listener.point(x, y); else { |
| 2741 | var a = [ x_, y_ ], b = [ x, y ]; |
| 2742 | if (clipLine(a, b)) { |
| 2743 | if (!v_) { |
| 2744 | listener.lineStart(); |
| 2745 | listener.point(a[0], a[1]); |
| 2746 | } |
| 2747 | listener.point(b[0], b[1]); |
| 2748 | if (!v) listener.lineEnd(); |
| 2749 | } else { |
| 2750 | listener.lineStart(); |
| 2751 | listener.point(x, y); |
| 2752 | } |
| 2753 | } |
| 2754 | } |
| 2755 | x_ = x, y_ = y, v_ = v; |
| 2756 | } |
| 2757 | return clip; |
| 2758 | }; |
| 2759 | function corner(p, direction) { |
no test coverage detected