MCPcopy Index your code
hub / github.com/benfry/processing4 / background

Method background

core/src/processing/core/PGraphics.java:7343–7357  ·  view source on GitHub ↗

The background() function sets the color used for the background of the Processing window. The default background is light gray. This function is typically used within draw() to clear the display window at the beginning of each frame, but it can be used inside setup() to set the

(int rgb)

Source from the content-addressed store, hash-verified

7341 * @see PGraphics#colorMode(int)
7342 */
7343 public void background(int rgb) {
7344// if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) {
7345// background((float) rgb);
7346//
7347// } else {
7348// if (format == RGB) {
7349// rgb |= 0xff000000; // ignore alpha for main drawing surface
7350// }
7351// colorCalcARGB(rgb, colorModeA);
7352// backgroundFromCalc();
7353// backgroundImpl();
7354// }
7355 colorCalc(rgb);
7356 backgroundFromCalc();
7357 }
7358
7359
7360 /**

Callers 3

defaultSettingsMethod · 0.95
reapplySettingsMethod · 0.95
clearMethod · 0.95

Calls 3

colorCalcMethod · 0.95
backgroundFromCalcMethod · 0.95
backgroundImplMethod · 0.95

Tested by

no test coverage detected