Sha256: b80bc06ec85a7980172cf26fb20063ba6b30ff205e85160cbd4df49d6d158692
Contents?: true
Size: 435 Bytes
Versions: 10
Compression:
Stored size: 435 Bytes
Contents
# The createImage() function provides a fresh buffer of pixels to play with. # This example creates an image gradient. def setup size 640, 360 @image = create_image 230, 230, ARGB @image.pixels.length.times do |i| @image.pixels[i] = color 0, 90, 102, (i % @image.width * 2) # red, green, blue, alpha end end def draw background 204 image @image, 90, 80 image @image, mouse_x-@image.width, mouse_y-@image.width end
Version data entries
10 entries across 10 versions & 1 rubygems