/** * Set the background to a grayscale value, based on the * current colorMode. */ public void background(float gray) { colorCalc(gray); backgroundFromCalc(); // backgroundImpl(); }
/** * Set the background to an r, g, b or h, s, b value, * based on the current colorMode. */ public void background(float x, float y, float z) { colorCalc(x, y, z); backgroundFromCalc(); // backgroundImpl(); }
/** * @param gray specifies a value between white and black */ public void background(float gray) { colorCalc(gray); backgroundFromCalc(); // backgroundImpl(); }
/** * @param v1 red or hue value (depending on the current color mode) * @param v2 green or saturation value (depending on the current color mode) * @param v3 blue or brightness value (depending on the current color mode) */ public void background(float v1, float v2, float v3) { colorCalc(v1, v2, v3); backgroundFromCalc(); // backgroundImpl(); }
public void background(float v1, float v2, float v3, float alpha) { colorCalc(v1, v2, v3, alpha); backgroundFromCalc(); }
/** * Clear the background with a color that includes an alpha value. This can * only be used with objects created by createGraphics(), because the main * drawing surface cannot be set transparent. * <p> * It might be tempting to use this function to partially clear the screen * on each frame, however that's not how this function works. When calling * background(), the pixels will be replaced with pixels that have that level * of transparency. To do a semi-transparent overlay, use fill() with alpha * and draw a rectangle. */ public void background(float x, float y, float z, float a) { colorCalc(x, y, z, a); backgroundFromCalc(); }
/** * @param alpha opacity of the background */ public void background(int rgb, float alpha) { // if (format == RGB) { // background(rgb); // ignore alpha for main drawing surface // // } else { // if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { // background((float) rgb, alpha); // // } else { // colorCalcARGB(rgb, alpha); // backgroundFromCalc(); // backgroundImpl(); // } // } colorCalc(rgb, alpha); backgroundFromCalc(); }
/** * See notes about alpha in background(x, y, z, a). */ public void background(int rgb, float alpha) { // if (format == RGB) { // background(rgb); // ignore alpha for main drawing surface // // } else { // if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { // background((float) rgb, alpha); // // } else { // colorCalcARGB(rgb, alpha); // backgroundFromCalc(); // backgroundImpl(); // } // } colorCalc(rgb, alpha); backgroundFromCalc(); }
/** * See notes about alpha in background(x, y, z, a). */ public void background(float gray, float alpha) { if (format == RGB) { background(gray); // ignore alpha for main drawing surface } else { colorCalc(gray, alpha); backgroundFromCalc(); // backgroundImpl(); } }
public void background(float gray, float alpha) { if (format == RGB) { background(gray); // ignore alpha for main drawing surface } else { colorCalc(gray, alpha); backgroundFromCalc(); // backgroundImpl(); } }