Monday 19 April 2010

The setup!




In my setup i knew i wanted to declare a background colour and use a custom font.


Declaring background colours is a simple task and requires one line of code. Using a font however is different.


void setup() {
PFont font;
font = loadFont("StormExtraBold-48.vlw");
textFont(font, 32);
text("word", 15, 50);
textSize(14);
text("word", 15, 70);
smooth();
size(400,400);
background(#77b2f5);

 Here is my setup. In this code i have imported a font that i have installed via dafont.com, and after declared its size/scale and declared where on my 400 x 400 sketch i want the text to appear! So at this point my sketch was importing data from the XML feed, and the setup of my sketch was complete. Now came the hard part the animation!

No comments:

Post a Comment