Sha256: 97db27e064db0b86029f4b9f51295a5962931ab0bd9e8efa567335ebcca95ca7
Contents?: true
Size: 453 Bytes
Versions: 10
Compression:
Stored size: 453 Bytes
Contents
# Loads a "mask" for an image to specify the transparency # in different parts of the image. The two images are blended # together using the mask() method of PImage. def setup size 640, 360 @image = load_image "test.jpg" @image_mask = load_image "mask.jpg" @image.mask @image_mask end def draw background((mouse_x + mouse_y) / 1.5) image @image, width / 2, height / 2 image @image, mouse_x - @image.width, mouse_y - @image.height end
Version data entries
10 entries across 10 versions & 1 rubygems