Sha256: 85082b2f8ac07cb1a84d942a8050d282cc170989173a026694e107d6eef1988c

Contents?: true

Size: 545 Bytes

Versions: 3

Compression:

Stored size: 545 Bytes

Contents

require 'ruby-processing'

class NofillApp < Processing::App

  def setup
    smooth
    background 255
    # In Ruby, methods and variables are under_scored instead of camelCased
    no_fill
    stroke 0
    # You might notice that there are no parenthesis or semicolons.
    # That's because they're optional.
    ellipse 60, 60, 100, 100
    # This line works too:
    ellipse(60, 60, 100, 100);
  end
  
  def draw
  
  end
  
end

# The names of classes are still camel cased.
NofillApp.new :title => "Nofill", :width => 200, :height => 200

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-processing-1.0.1 samples/learning_processing/chapter_01/2_nofill.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_01/2_nofill.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_01/2_nofill.rb