- 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 | ### settings()
Examples |
    // Run code at full screen using the default renderer

    int x = 0;

    void settings() {
      fullScreen();
    }

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

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
    // Run code at full screen using the P2D renderer
    // on screen 2 of a multiple monitor hardware setup

    int x = 0;

    void settings() {
      fullScreen(P2D, 2);
    }

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

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
    // Run code at full screen using the P2D renderer
    // across all screens on a multiple monitor setup

    int x = 0;

    void settings() {
      fullScreen(P2D, SPAN);
    }

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

    void draw() {
      rect(x, height*0.2, 1, height*0.6);
      x = x + 2;
    }
    int w = 200;
    int h = 200;
    int x = 0;

    void settings() {
      size(w, h);
    }

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

    void draw() {
      rect(x, 10, 1, 180);
      x = x + 2;
    }
Description | The settings() function is new with Processing 3.0. It's not needed in most sketches. It's only useful when it's necessary to define the parameters to size() with a variable or to load that information from a file. Alternately, the settings() function is necessary when using Processing code outside of the Processing Development Environment (PDE). For example, when using the Eclipse code editor, it's necessary to use settings() to define the size() and smooth() values for a sketch..
Syntax |
    settings()
Returns | void
Related | fullScreen() setup() smooth()

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