Sha256: 48d96a36787e3d1d2820f3a65d024e0ab118b8fbaa6d8d7724c5511abbdb6cd4

Contents?: true

Size: 733 Bytes

Versions: 4

Compression:

Stored size: 733 Bytes

Contents

module Rubyvis
  module SvgScene
    def self.image(scenes)
      #e=scenes._g.elements[1]
      e=scenes._g.get_element(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.set_attributes("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

4 entries across 4 versions & 1 rubygems

Version Path
rubyvis-0.7.0 lib/rubyvis/scene/svg_image.rb
rubyvis-0.6.1 lib/rubyvis/scene/svg_image.rb
rubyvis-0.6.0 lib/rubyvis/scene/svg_image.rb
rubyvis-0.5.2 lib/rubyvis/scene/svg_image.rb