void setup(){
size(500,400);
background(100,200,200);
fill(255,0,0);
rect(0,0,50,50);
fill(0,255,0);
rect(0,50,50,50);
fill(0,0,255);
rect(0,100,50,50);
fill(0,0,0);
rect(0,150,50,50);
fill(255,255,255);
rect(0,200,50,50);
fill(255,255,255);
rect(0,250,50,50);
rect(450,0,50,50);
rect(450,50,50,50);
}
int www=5;
void draw(){
if(mousePressed && mouseX<50 && mouseY<50) stroke(255,0,0);
else if(mousePressed && mouseX<50 && mouseY<100) stroke(0,255,0);
else if(mousePressed && mouseX<50 && mouseY<150) stroke(0,0,255);
else if(mousePressed && mouseX<50 && mouseY<200) stroke(0,0,0);
else if(mousePressed && mouseX<50 && mouseY<250) save("aaaa.png");
else if(mousePressed && mouseX<50 && mouseY<300){
PImage file = loadImage("aaaa.png");
image(file, 0,0,500,400);
}else if(mousePressed && mouseX>450 && mouseY<50){
strokeWeight(++www);
}
else if(mousePressed && mouseX>450 && mouseY<1000){
strokeWeight(--www);
if(www<2)www=2;
}
else if(mousePressed) line(mouseX, mouseY, pmouseX, pmouseY);
}
本周作業小畫家
本周心得
今天上小畫家很有心得,覺得自己又進步了!但在後面的processing+kinect的部分讓我跟不上 有點卻步,希望下次可以更進步!
沒有留言:
張貼留言