Adding Request Image example

This commit is contained in:
Casey Reas
2011-09-18 06:30:55 +00:00
parent ef5da1cd45
commit 76e9248e00
19 changed files with 98 additions and 15 deletions
@@ -7,18 +7,16 @@
PImage img;
void setup()
{
void setup() {
size(640, 360);
img = createImage(230, 230, ARGB);
for(int i = 0; i < img.pixels.length; i++) {
float a = map(i, 0, img.pixels.length, 255, 0);
img.pixels[i] = color(0, 90, 102, a);
img.pixels[i] = color(0, 153, 204, a);
}
}
void draw()
{
void draw() {
background(0);
image(img, 90, 80);
image(img, mouseX-img.width/2, mouseY-img.height/2);