Book use Function
//FAV Book Function
//int posX=0; //fill value to move(X)
//int posY=0;//fill value to move(Y)
void setup() {
size(500, 500);
background(255);//white
book(0, 0);
}
void book(int posX, int posY) {//function
fill(#B3CFF0);//blue
strokeWeight(8);//thick line
rect(80+posX, 130+posY, 340, 220);//body of book
strokeWeight(6);//thin line
fill(#78B2F7);//dark blue
rect(230+posX, 130+posY, 40, 220);//spine
rect(290+posX, 150+posY, 110, 60);//title's frame
fill(0);//black
textSize(30);
text("Conan", 300+posX, 190+posY);//Title
strokeWeight(3);//Thinest Line
line(250+posX, 130+posY, 120+posX, 100+posY);//pages1 r
line(250+posX, 130+posY, 110+posX, 108+posY);//pages2 r
line(250+posX, 130+posY, 100+posX, 115+posY);//pages3 r
line(120+posX, 100+posY, 80+posX, 130+posY);//pages border r
line(250+posX, 130+posY, 380+posX, 100+posY);//pages1 l
line(250+posX, 130+posY, 390+posX, 108+posY);//pages2 l
line(250+posX, 130+posY, 400+posX, 115+posY);//pages3 l
line(380+posX, 100+posY, 420+posX, 130+posY);//pages border l
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น