Sha256: 3bb8d0a5fbffa66c4b21002e1298d43ff8ff7922165903d5208e6c7d60c6697b
Contents?: true
Size: 499 Bytes
Versions: 10
Compression:
Stored size: 499 Bytes
Contents
# Images can be loaded and displayed to the screen at their actual size # or any other size. def setup size 640, 360 # The file "jelly.jpg" must be in the data folder # of the current sketch to load successfully @a = load_image "jelly.jpg" no_loop # Makes draw only run once end def draw # Displays the image at its actual size at point (0,0) image @a, 0, 0 # Displays the image at point (@a.width, 0) at half of its size image @a, @a.width, 0, @a.width/2, @a.height/2 end
Version data entries
10 entries across 10 versions & 1 rubygems