Sha256: c3c878e5de302367813b7969cdad98c3f955088c02cd08a6f760161d836e7cd8
Contents?: true
Size: 764 Bytes
Versions: 4
Compression:
Stored size: 764 Bytes
Contents
module Rubyvis module SvgScene def self.rule(scenes) #e=scenes._g.elements[1] e=scenes._g.get_element(1) scenes.each_with_index do |s,i| next unless s.visible stroke=s.stroke_style next if(stroke.opacity==0.0) e=SvgScene.expect(e,'line', { "shape-rendering"=> s.antialias ? nil : "crispEdges", "pointer-events"=> s.events, "cursor"=> s.cursor, "x1"=> s.left, "y1"=> s.top, 'x2'=> s.left+s.width, 'y2'=>s.top+s.height, "stroke"=> stroke.color, "stroke-opacity"=> stroke.opacity, "stroke-width"=> s.line_width / self.scale }) e=SvgScene.append(e,scenes,i) end e end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubyvis-0.7.0 | lib/rubyvis/scene/svg_rule.rb |
rubyvis-0.5.2 | lib/rubyvis/scene/svg_rule.rb |
rubyvis-0.5.1 | lib/rubyvis/scene/svg_rule.rb |
rubyvis-0.5.0 | lib/rubyvis/scene/svg_rule.rb |