Positvie Sign by Function
//Positive Sign
int colors=0;
void setup() {
size(500, 500);
}
void draw() {
background(#FF0D0D);//red
positive();
}
void positive() {
int dX=120;//diameterX
int dY=160;//diameterY
int w=100;//weight
int h=100;//height
//rectangular area
stroke(255);
strokeWeight(0);
fill(colors);
rect(dX, dY, w*3, h);//horizontal rect
rect(dX+100, dY-100, w, h*3);//vertical rect
}
void mousePressed() {
if (colors == 0) {
colors = 255;
} else {
colors = 0;
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น