Name

height

Description

System variable which stores the height of the display window. This value is set by the second parameter of the size() function. For example, the function call size(320, 240) sets the height variable to the value 240. The value of height defaults to 100 if size() is not used in a program.

Examples

  • size(400, 400);
    noStroke();
    background(0);
    rect(160, 0, 80, height);
    rect(240, 0, 80, height/8);
    Image output for example 1