Class: Cairo::Surface

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gdk4/cairo.rb

Instance Method Summary collapse

Instance Method Details

#to_pixbuf(options = {}) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/gdk4/cairo.rb', line 45

def to_pixbuf(options={})
  src_x = options[:src_x] || 0
  src_y = options[:src_y] || 0
  w = options[:width]
  h = options[:height]
  if w.nil? and respond_to?(:width)
    w = width
  end
  if h.nil? and respond_to?(:height)
    h = height
  end
  to_pixbuf_raw(src_x, src_y, w, h)
end

#to_pixbuf_rawObject



44
# File 'lib/gdk4/cairo.rb', line 44

alias_method :to_pixbuf_raw, :to_pixbuf