Sha256: 695ed6437ac389640ef56cc86f6f9e64727409b3defea8d474a0aa92c477f3f7

Contents?: true

Size: 708 Bytes

Versions: 13

Compression:

Stored size: 708 Bytes

Contents

module Rubyvis
  module SvgScene
    def self.image(scenes)
      e=scenes._g.elements[1]
      scenes.each_with_index do |s,i|
        next unless s.visible
        e=self.fill(e,scenes,i)
        if s.image
          raise "Not implemented yet"
        else
          e = self.expect(e, "image", {
          "preserveAspectRatio"=> "none",
          "cursor"=> s.cursor,
          "x"=> s.left,
          "y"=> s.top,
          "width"=> s.width,
          "height"=> s.height
          })
          
          e.add_attribute("xlink:href", s.url);
        end
        e = self.append(e, scenes, i);
        
        #/* stroke */
        e = self.stroke(e, scenes, i);
      end
      e
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rubyvis-0.4.1 lib/rubyvis/scene/svg_image.rb
rubyvis-0.4.0 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.6 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.5 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.4 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.3 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.2 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.1 lib/rubyvis/scene/svg_image.rb
rubyvis-0.3.0 lib/rubyvis/scene/svg_image.rb
rubyvis-0.2.2 lib/rubyvis/scene/svg_image.rb
rubyvis-0.2.1 lib/rubyvis/scene/svg_image.rb
rubyvis-0.2.0 lib/rubyvis/scene/svg_image.rb
rubyvis-0.1.7 lib/rubyvis/scene/svg_image.rb