FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

rectMode()

   
Examples  
rectMode(CENTER); 
rect(35, 35, 50, 50); 
rectMode(CORNER); 
fill(102); 
rect(35, 35, 50, 50); 
Description   Modifies the location from which rectangles draw. The default mode is rectMode(CORNER), which specifies the location to be the upper left corner of the shape and uses the third and fourth parameters of rect() to specify the width and height. The syntax rectMode(CORNERS) uses the first and second parameters of rect() to set the location of one corner and uses the third and fourth parameters to set the opposite corner. The syntax rectMode(CENTER) draws the image from its center point and uses the third and forth parameters to rect() to specify the image's width and height. The parameter must be written in "ALL CAPS" because Processing is a case sensitive language.
   
Syntax  
rectMode(MODE)
   
Parameters  
MODE   Either CORNER, CORNERS, CENTER

   
Returns   None
   
Usage   Web & Application
   
Related   rect()
 
 






   
 
Updated: Fri Jul 15 16:36:04 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info