GSDP:GAM100/CProcessing/displayHeight

From Inside
< GSDP:GAM100‎ | CProcessing
Revision as of 19:07, 19 September 2018 by >Justin.chambers
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>