GSDP:GAM100/CProcessing/background()

From Inside
Jump to: navigation, search

background()

Description

The function background() allows you to set the background color of the screen also clearing anything previously drawn to the screen. Typically, you will use this at the beginning of any update loop to set a background color.

Parameters

backgroundColor(PColor color)

  • color - (PColor) the color to set the background to

Example

void update() 
{
  // Create the color green
  PColor myColor = color(0, 255, 0, 255);

  // Set the background color to green
  background(myColor);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>