PImage img;
color nowColor;
void setup(){
size(250,250);
img = loadImage("cloud.png");
}
void draw(){
image(img,0,0);
fill(nowColor); rect(0,0,30,30);
}
void mouseMoved(){
loadPixels();
int now = width * mouseY + mouseX ;
nowColor = pixels[now];
}
沒有留言:
張貼留言