/** * @param rgb can be packed ARGB or a gray in this case */ public final int color(int rgb, float alpha) { // ignore if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { colorCalc(rgb, alpha); } else { colorCalcARGB(rgb, alpha); } return calcColor; }
/** * @param c can be packed ARGB or a gray in this case */ public final int color(int c, float alpha) { // ignore // if (((c & 0xff000000) == 0) && (c <= colorModeX)) { colorCalc(c, alpha); // } else { // colorCalcARGB(c, alpha); // } return calcColor; }
/** * @param gray specifies a value between white and black */ public void stroke(float gray) { colorCalc(gray); strokeFromCalc(); }
protected void colorCalc(int rgb, float alpha) { if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { // see above colorCalc((float) rgb, alpha); } else { colorCalcARGB(rgb, alpha); } }
/** * @param alpha opacity of the image */ public void tint(int rgb, float alpha) { colorCalc(rgb, alpha); tintFromCalc(); }
/** * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) * @param v3 blue or brightness value (depending on current color mode) */ public void fill(float v1, float v2, float v3) { colorCalc(v1, v2, v3); fillFromCalc(); }
/** * @param gray number specifying value between white and black */ public void ambient(float gray) { colorCalc(gray); ambientFromCalc(); }
/** * @param gray number specifying value between white and black */ public void fill(float gray) { colorCalc(gray); fillFromCalc(); }
/** * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) * @param v3 blue or brightness value (depending on current color mode) */ public void specular(float v1, float v2, float v3) { colorCalc(v1, v2, v3); specularFromCalc(); }
/** * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) * @param v3 blue or brightness value (depending on current color mode) */ public void emissive(float v1, float v2, float v3) { colorCalc(v1, v2, v3); emissiveFromCalc(); }
public void tint(int rgb, float alpha) { // if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { // tint((float) rgb, alpha); // // } else { // colorCalcARGB(rgb, alpha); // tintFromCalc(); // } colorCalc(rgb, alpha); tintFromCalc(); }
public void emissive(int rgb) { // if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) { // emissive((float) rgb); // // } else { // colorCalcARGB(rgb, colorModeA); // emissiveFromCalc(); // } colorCalc(rgb); emissiveFromCalc(); }
/** * 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 alpha opacity of the fill */ public void fill(int rgb, float alpha) { colorCalc(rgb, alpha); fillFromCalc(); }
/** * @param v1 red or hue value (depending on current color mode) * @param v2 green or saturation value (depending on current color mode) * @param v3 blue or brightness value (depending on current color mode) */ public void ambient(float v1, float v2, float v3) { colorCalc(v1, v2, v3); ambientFromCalc(); }
/** * @param gray specifies a value between white and black */ public void tint(float gray) { colorCalc(gray); tintFromCalc(); }
/** * gray number specifying value between white and black */ public void emissive(float gray) { colorCalc(gray); emissiveFromCalc(); }
/** * 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(); } }