Sha256: 04317c3272e364ecfa810c4cef1da039834eee046254cdc59aa47c70e404f3fa
Contents?: true
Size: 766 Bytes
Versions: 10
Compression:
Stored size: 766 Bytes
Contents
# Ignore Styles. # Illustration by George Brower. # # Shapes are loaded with style information that tells them how # to draw (the color, stroke weight, etc.) The disableStyle() # method of PShape turns off this information. The enableStyle() # method turns it back on. # attr_reader :bot def setup size(640, 360) # The file "bot1.svg" must be in the data folder # of the current sketch to load successfully @bot = load_shape("bot1.svg") end def draw background(102) # Draw left bot bot.disableStyle() # Ignore the colors in the SVG fill(0, 102, 153) # Set the SVG fill to blue stroke(255) # Set the SVG fill to white shape(bot, 20, 25, 300, 300) # Draw right bot bot.enableStyle() shape(bot, 320, 25, 300, 300) end
Version data entries
10 entries across 10 versions & 1 rubygems