class Cairo::Context

Public Instance Methods

render_poppler_page(page, options={}) click to toggle source
# File poppler/lib/poppler/cairo.rb, line 19
def render_poppler_page(page, options={})
  page.render(self)
end
Also aliased as: show_poppler_page
render_rsvg_handle(handle, options={}) click to toggle source
# File rsvg2/lib/rsvg2/cairo.rb, line 19
def render_rsvg_handle(handle, options={})
  id = options[:id]
  if id
    handle.render_cairo_sub(self, id)
  else
    handle.render_cairo(self)
  end
end
Also aliased as: show_rsvg_handle
set_source_clutter_color(color) click to toggle source
# File clutter/lib/clutter/cairo.rb, line 19
def set_source_clutter_color(color)
  Clutter.cairo_set_source_color(self, color)
end
Also aliased as: source_clutter_color=
set_source_color(color) click to toggle source
# File gdk3/lib/gdk3/cairo.rb, line 21
def set_source_color(color)
  if color.is_a?(Gdk::Color)
    set_source_gdk_color(color)
  else
    set_source_color_raw(color)
  end
end
set_source_pixbuf(pixbuf, pixbuf_x=0, pixbuf_y=0) click to toggle source
# File gdk3/lib/gdk3/cairo.rb, line 60
def set_source_pixbuf(pixbuf, pixbuf_x=0, pixbuf_y=0)
  set_source_pixbuf_raw(pixbuf, pixbuf_x, pixbuf_y)
end
Also aliased as: set_source_pixbuf_raw
set_source_pixbuf_raw(pixbuf, pixbuf_x=0, pixbuf_y=0)
Alias for: set_source_pixbuf
set_source_rgba(rgba, g=nil, b=nil, a=nil) click to toggle source
# File gdk3/lib/gdk3/cairo.rb, line 39
def set_source_rgba(rgba, g=nil, b=nil, a=nil)
  case rgba
  when Gdk::RGBA
    set_source_gdk_rgba(rgba)
  when Array
    set_source_rgba_raw(rgba)
  else
    r = rgba
    set_source_rgba_raw([r, g, b, a || 1.0])
  end
end
show_poppler_page(page, options={})
Alias for: render_poppler_page
show_rsvg_handle(handle, options={})
Alias for: render_rsvg_handle
source_clutter_color=(color)
source_color=(color) click to toggle source
# File gdk3/lib/gdk3/cairo.rb, line 32
def source_color=(color)
  set_source_color(color)
  color
end
source_rgba=(rgba) click to toggle source
# File gdk3/lib/gdk3/cairo.rb, line 54
def source_rgba=(rgba)
  set_source_rgba(rgba)
  rgba
end