topical media & game development

talk show tell print

graphic-processing-learning-17-example-17-1-example-17-1.pde / pde



  // Learning Processing
  // Daniel Shiffman
  // http://www.learningprocessing.com
  
  // Example 17-1: Simple displaying text
  
  // Step 2: Declare PFont variable
  PFont f;  
  
  void setup() {
    size(200,200);
    
    // Step 3: Load Font
    f = loadFont( "ArialMT-16.vlw" ); 
  } 
  
  void draw() {
    background(255);
    textFont(f,16); // Step 4: Specify font to be used
    fill(0);        // Step 5: Specify font color
    
    // Step 6: Display Text
    text ( "Mmmmm ... Strings ..." ,10,100); 
    
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.