- Processing
- p5.js
- Processing.py

- Processing Foundation

This reference is for Processing 3.0+. 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 | ### fullScreen()
Examples |
    // Run the code at the full dimensions of the screen currently
    // selected inside the Preferences window

    int x = 0;

    void setup() {
      fullScreen();
      background(0);
      noStroke();
      fill(102);
    }

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
    // If more than one screen is attached to the computer, run the
    // code at the full dimensions of the screen defined by the
    // parameter to fullScreen()

    int x = 0;

    void setup() {
      fullScreen(2);
      background(0);
      noStroke();
      fill(102);
    }

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
    // Run full screen using the P2D renderer on screen 2

    int x = 0;

    void setup() {
      fullScreen(P2D, 2);
      background(0);
      noStroke();
      fill(102);
    }

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
    // If more than one screen is attached to the computer, run the
    // code at the full dimensions across all of the attached screens

    int x = 0;

    void setup() {
      fullScreen(P2D, SPAN);
      background(0);
      noStroke();
      fill(102);
    }

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
Description | This function is new for Processing 3.0. It opens a sketch using the full size of the computer's display. This function must be the first line in setup(). The first parameter defines the renderer to use and the second defines either an individual screen to display to or to open a full-screen window across all of the attached displays if there are more than one. The size() and fullScreen() methods cannot both be used in the same program, just choose one. Prior to Processing 3.0, a full-screen program was defined with size(displayWidth, displayHeight).
Syntax |
    fullScreen()
    fullScreen(display)
    fullScreen(renderer)
    fullScreen(renderer, display)
Parameters |
renderer | String: the renderer to use, e.g. P2D, P3D, JAVA2D (default)
display | int: the screen to run the sketch on (1, 2, 3, etc.)
Returns | void
Related | settings() setup() smooth()

Updated on June 20, 2015 10:37:33pm UTC