Skip to content

Instantly share code, notes, and snippets.

@jamesmichiemo
Created July 3, 2019 23:18
Show Gist options
  • Select an option

  • Save jamesmichiemo/edf5377d0c0a4f96288b1dfc31bae4f0 to your computer and use it in GitHub Desktop.

Select an option

Save jamesmichiemo/edf5377d0c0a4f96288b1dfc31bae4f0 to your computer and use it in GitHub Desktop.
processing + propane sketch
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# set stroke attributes
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class StrokeAttributes < Propane::App
def settings
size 480, 120
end
def setup
sketch_title 'Set Stroke Weight'
end
def draw
strokeWeight 12
strokeJoin ROUND # round the stroke corners
rect 40, 25, 70, 70
strokeJoin BEVEL # bevel the stroke corners
rect 140, 25, 70, 70
strokeCap SQUARE # square the line endings
line 270, 25, 340, 95
strokeCap ROUND # round the line endings
line 350, 25, 420, 95
end
end
StrokeAttributes.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment