GSDP:GAM100/CProcessing/width

From Inside
Jump to: navigation, search

width

Description

The system variable that always contains the width of the screen.

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

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>