Last active
August 19, 2019 13:26
-
-
Save jamesmichiemo/c609c773e10735464b7155018229369d to your computer and use it in GitHub Desktop.
processing + propane sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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