Sha256: 2ad0e41c663114b5f049ddc3e29bac42c87e6ce4c8b96549202900d68d71d0a4

Contents?: true

Size: 524 Bytes

Versions: 10

Compression:

Stored size: 524 Bytes

Contents

# Multiple Frames. 
# 
# Saves one PDF document of many frames drawn to the screen.
# Starts the file when the mouse is pressed and end the file
# when the mouse is released.


load_library 'pdf'
include_package 'processing.pdf'

def setup
  size(600, 600)
  frame_rate(24)
  background(255)
end

def draw
  stroke(0, 20)
  stroke_weight(20.0)
  line(mouse_x, 0, width-mouse_y, height)
end


def mouse_pressed
  begin_record(PDF, "Lines.pdf"); 
  background(255);
end

def mouse_released
  end_record
  background(255)
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ruby-processing-2.6.3 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.6.2 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.6.1 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.6.0 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.5.1 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.5.0 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.4.4 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.4.3 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.4.2 samples/processing_app/library/pdf/many_frames.rb
ruby-processing-2.4.1 samples/processing_app/library/pdf/many_frames.rb