Reference for Processing (BETA) version 0135+. 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.
Syntax
screen.width
screen.height
Parameters
Usage Web & Application
Updated on November 05, 2006 03:42:29pm PST

Creative Commons License