| 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 |  | ### size()
Examples |  |
    void setup() {
     size(320, 240);
     background(153);
    }

    void loop() {
     line(0, 0, width, height);
    }
Description |  | Defines the dimension of the display window in units of pixels. The size() function must be the first line in setup(). If size() is not called, the default size of the window is 100x100 pixels. The system variables width and height are set based on the parameters passed to the size() function.
Syntax |  |
    size(width, height)
Parameters |  |
width |  | int: width of the display window in units of pixels
height |  | int: height of the display window in units of pixels
Returns |  | None
Usage |  | Web & Application

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