GSDP:GAM100/CProcessing/displayHeight

displayHeight

Description

The system variable displayHeight always contains the current with of the display. Specifically, this is the area of the screen you can draw to, not including the border on the window.

Example

void update() 
{
    // set the background color to gray
    background(200, 200, 200, 255);
 
    // set the rectangle drawing mode to CENTER
    rectMode(CENTER);
 
    // draw a rectangle at the center of the screen, half the size of the screen
    rect(displayWidth / 2.0f, displayHeight / 2.0f, displayWidth / 2.0f, displayHeight / 2.0f);
}

Related