topical media & game development

talk show tell print

graphic-processing-learning-01-example-1-4-example-1-4.pde / pde



  // Learning Processing
  // Daniel Shiffman
  // http://www.learningprocessing.com
  
  // Example 1-4: Alpha Transparency
  size(200,200);
  background(0);
  noStroke();
  
  // No fourth argument means 100% opacity.
  fill(0,0,255);
  rect(0,0,100,200);
  
  // 255 means 100% opacity.
  fill(255,0,0,255);
  rect(0,0,200,40);
  
  // 75% opacity.
  fill(255,0,0,191);
  rect(0,50,200,40);
  
  // 55% opacity.
  fill(255,0,0,127);
  rect(0,100,200,40);
  
  // 25% opacity.
  fill(255,0,0,63);
  rect(0,150,200,40);
  
  


(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.