Sha256: 2b774689c04243addc6e177c0659d980badd6d572a543592b8254c3f27306d4c

Contents?: true

Size: 361 Bytes

Versions: 4

Compression:

Stored size: 361 Bytes

Contents

require 'ruby-processing'

class DefiningAFunction < Processing::App

  def setup
  
  end
  
  def draw
  
  end
  
  # This example defines a function, but it is
  # not called.  So nothing happens.
  def draw_black_circle
    fill 0
    ellipse 50, 50, 20, 20
  end
  
end

DefiningAFunction.new :title => "Defining A Function", :width => 200, :height => 200

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-processing-1.0.1 samples/learning_processing/chapter_07/01_defining_a_function.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_07/01_defining_a_function.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_07/01_defining_a_function.rb
ruby-processing-1.0.4 samples/learning_processing/chapter_07/01_defining_a_function.rb