Reference for Processing version 1.5. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

Name

### screen

Examples

    void setup() {
      size(screen.width, screen.height);
    }

    void draw() {
      line(0, 0, screen.width, screen.height);
    }

Description

System variable which stores the dimensions of the computer screen. For example, if the current screen resolution is 1024x768, screen.width is 1024 and screen.height is 768. These dimensions are useful when exporting full-screen applications.
To ensure that the sketch takes over the entire screen, use "Present" instead of "Run". Otherwise the window will still have a frame border around it and not be placed in the upper corner of the screen. On Mac OS X, the menu bar will remain present unless "Present" mode is used.

Usage | Web & Application

Updated on August 30, 2010 04:29:39pm EDT