(a)HW4-1
Java applet: http://icac.no-ip.org/ian/HW4-1/
In this HW, it continues HW3-2. The main tasks are to display texts on drawing board and to save the content of the drawing board. I felt that displaying texts is alittle bit difficult but it became easy after teacher explained the concept of Pfont and several codes associated with it. So in this week, I learn that:
create PFont and load font then display font:
PFont font;
font = loadFont("CourierNew36.vlw"); // load font
textFont(font); // Set the current text font
text("Size(10)", 25,50); // Write "Size(10)" at coordinate (50,50)
save content of drawing borad: save("x.jpg");

(b)front image

(c) back image
In this week, we also had drawing game.
The result will be used in HW4-2. I am really not good at drawing so I created these two pictures(a)(b), and look foward next week lecture!
No comments:
Post a Comment