sketchWidth

Examples

sketchWidth example
void draw() {
  background(0);
  noStroke();
  fill(255);
  rect(0, 40, sketchWidth, 20);
  rect(0, 60, sketchWidth / 2, 20);
}

Description

System variable that stores the width of the display window. The value of sketchWidth is ordinarily 144.

Related

sketchHeight

Back to index