Search processing.org:

Reference for Processing version 1.0.1+. 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

### 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 November 22, 2008 08:39:25pm PST