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



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/gdk4/cairo.rb', line 49

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



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

alias_method :to_pixbuf_raw, :to_pixbuf