Class: Cairo::Surface

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

Instance Method Summary collapse

Instance Method Details

#to_pixbuf(options = {}) ⇒ Object



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/gdk3/cairo.rb', line 67

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



66
# File 'lib/gdk3/cairo.rb', line 66

alias_method :to_pixbuf_raw, :to_pixbuf