| Language \ Environment \ Comparison |

| Index

| The Processing 1.0 _ALPHA_ Reference is a work in progress. If you see any errors or have any comments, please write to: reas at groupc.net

Name |  | ### rectMode()
Examples |  |
    rectMode(CENTER_DIAMETER);
    rect(35, 35, 50, 50);
    rectMode(CORNER);
    fill(102);
    rect(35, 35, 50, 50);
Description |  | The origin of the rectangle is modified with the rectMode() function. The default rectangle mode is rectMode(CORNER), which specifies the location to be the upper left corner of the shape. The rectMode(CENTER_DIAMETER) function call draws the shape from its center point. With rectMode(CORNERS), the parameters to the rectangle function define the two corners of the shape. The parameter must written in "ALL CAPS" because Processing is a case sensitive language.
Syntax |  |
    rectMode(MODE)
Parameters |  |
MODE |  | Either CORNER, CORNERS, CENTER_DIAMETER
Returns |  | None
Usage |  | Web & Application
Related |  | rect()

| © 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea |
| Processing is an open project initiated by Ben Fry and Casey Reas |