GSDP:GAM100/CProcessing/windowWidth

From Inside
Jump to: navigation, search

windowWidth

Description

The system variable windowWidth always contains the current width of the window. Specifically, this is the area of the entire window, not specifically the draw-able space.

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(windowWidth / 2.0f, windowHeight / 2.0f, windowWidth / 2.0f, windowHeight / 2.0f);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>