lib/rubyvis/scene/svg_line.rb in rubyvis-0.1.5 vs lib/rubyvis/scene/svg_line.rb in rubyvis-0.1.6

- old
+ new

@@ -70,19 +70,19 @@ #/* visible */ next if (!s1.visible and !s2.visible) stroke = s1.stroke_style - fill = pv.Color.transparent + fill = Rubyvis.Color.transparent next if stroke.opacity==0.0 #/* interpolate */ d=nil if ((s1.interpolate == "linear") and (s1.lineJoin == "miter")) fill = stroke; - stroke = pv.Color.transparent; + stroke = Rubyvis.Color.transparent; d = path_join(scenes[i - 1], s1, s2, scenes[i + 2]); elsif(paths) d = paths[i]; else d = "M" + s1.left + "," + s1.top + path_segment(s1, s2); @@ -140,13 +140,13 @@ # the line segment, and has length lineWidth / 2. ABCD forms the initial # bounding box of the line segment (i.e., the line segment if we were to do # no joins). # - p1 = pv.vector(s1.left, s1.top) + p1 = Rubyvis.vector(s1.left, s1.top) - p2 = pv.vector(s2.left, s2.top) + p2 = Rubyvis.vector(s2.left, s2.top) p = p2.minus(p1) v = p.perp().norm() @@ -170,10 +170,10 @@ a = line_intersect(p1, v1, a, p); end #/* Similarly, for end join. */ if (s3 && s3.visible) - v2 = pv.vector(s3.left, s3.top).minus(p2).perp().norm().plus(v); + v2 = Rubyvis.vector(s3.left, s3.top).minus(p2).perp().norm().plus(v); c = line_intersect(p2, v2, c, p); b = line_intersect(p2, v2, b, p); end return "M" + a.x + "," + a.y+ "L" + b.x + "," + b.y+ " " + c.x + "," + c.y+ " " + d.x + "," + d.y