Parent

Methods

Class/Module Index [+]

Quicksearch

Demo::CairoClip

Public Class Methods

new() click to toggle source
# File gtk2/sample/gtk-demo/cairo-clip.rb, line 15
def initialize
  super('cairo clip')
end

Public Instance Methods

draw(cr) click to toggle source
# File gtk2/sample/gtk-demo/cairo-clip.rb, line 19
def draw(cr)
  cr.arc(0.5, 0.5, 0.3, 0, 2 * Math::PI)
  cr.clip

  cr.new_path

  cr.rectangle(0, 0, 1, 1)
  cr.fill
  cr.set_source_rgba(0, 1, 0)
  cr.move_to(0, 0)
  cr.line_to(1, 1)
  cr.move_to(1, 0)
  cr.line_to(0, 1)
  cr.stroke
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.