Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Last active August 19, 2019 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmichiemo/c609c773e10735464b7155018229369d to your computer and use it in GitHub Desktop.
Save jamesmichiemo/c609c773e10735464b7155018229369d to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# load an image
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class LoadImage < Propane::App
def settings
size 300, 200
end
def setup
sketch_title 'load an image'
@img = load_image data_path("front.jpg")
no_loop
end
def draw
image @img, 0, 0
image @img, @img.width, 0, @img.width / 2, @img.height / 2
end
end
LoadImage.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment