pv.SvgScene.wedge = function(scenes) { var e = scenes.$g.firstChild; for (var i = 0; i < scenes.length; i++) { var s = scenes[i]; /* visible */ if (!s.visible) continue; var fill = s.fillStyle, stroke = s.strokeStyle; if (!fill.opacity && !stroke.opacity) continue; /* points */ var r1 = s.innerRadius, r2 = s.outerRadius, a = Math.abs(s.angle), p; if (a >= 2 * Math.PI) { if (r1) { p = "M0," + r2 + "A" + r2 + "," + r2 + " 0 1,1 0," + (-r2) + "A" + r2 + "," + r2 + " 0 1,1 0," + r2 + "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1) + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z"; } else { p = "M0," + r2 + "A" + r2 + "," + r2 + " 0 1,1 0," + (-r2) + "A" + r2 + "," + r2 + " 0 1,1 0," + r2 + "Z"; } } else { var sa = Math.min(s.startAngle, s.endAngle), ea = Math.max(s.startAngle, s.endAngle), c1 = Math.cos(sa), c2 = Math.cos(ea), s1 = Math.sin(sa), s2 = Math.sin(ea); if (r1) { p = "M" + r2 * c1 + "," + r2 * s1 + "A" + r2 + "," + r2 + " 0 " + ((a < Math.PI) ? "0" : "1") + ",1 " + r2 * c2 + "," + r2 * s2 + "L" + r1 * c2 + "," + r1 * s2 + "A" + r1 + "," + r1 + " 0 " + ((a < Math.PI) ? "0" : "1") + ",0 " + r1 * c1 + "," + r1 * s1 + "Z"; } else { p = "M" + r2 * c1 + "," + r2 * s1 + "A" + r2 + "," + r2 + " 0 " + ((a < Math.PI) ? "0" : "1") + ",1 " + r2 * c2 + "," + r2 * s2 + "L0,0Z"; } } e = this.expect(e, "path", { "shape-rendering": s.antialias ? null : "crispEdges", "pointer-events": s.events, "cursor": s.cursor, "transform": "translate(" + s.left + "," + s.top + ")", "d": p, "fill": fill.color, "fill-rule": "evenodd", "fill-opacity": fill.opacity || null, "stroke": stroke.color, "stroke-opacity": stroke.opacity || null, "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null }); e = this.append(e, scenes, i); } return e; };