Parent

Class/Module Index [+]

Quicksearch

Rabbit::ImageManipulable::SVG

Public Class Methods

match?(filename) click to toggle source
# File lib/rabbit/image/svg.rb, line 15
def match?(filename)
  File.open(filename) do |f|
    /<svg|<!DOCTYPE\s+svg/ =~ f.read(200)
  end
end

Public Instance Methods

draw(canvas, x, y, params={}) click to toggle source
# File lib/rabbit/image/svg.rb, line 22
def draw(canvas, x, y, params={})
  if @handle and canvas.rsvg_available?
    default_params = {
      :width => width,
      :height => height,
    }
    canvas.draw_rsvg_handle(@handle, x, y, default_params.merge(params))
  else
    super
  end
end
pixbuf() click to toggle source
# File lib/rabbit/image/svg.rb, line 34
def pixbuf
  @pixbuf ||= to_pixbuf(width, height)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.