MCPcopy Index your code
hub / github.com/processing/processing / colorCalc

Method colorCalc

core/src/processing/core/PGraphics.java:7642–7649  ·  view source on GitHub ↗

Set the fill to either a grayscale value or an ARGB int. The problem with this code is that it has to detect between these two situations automatically. This is done by checking to see if the high bits (the alpha for 0xAA000000) is set, and if not, whether the color value that follows is less th

(int rgb)

Source from the content-addressed store, hash-verified

7640 * of stroke or fill to more directly specify the desired result.
7641 */
7642 protected void colorCalc(int rgb) {
7643 if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) {
7644 colorCalc((float) rgb);
7645
7646 } else {
7647 colorCalcARGB(rgb, colorModeA);
7648 }
7649 }
7650
7651
7652 protected void colorCalc(int rgb, float alpha) {

Callers 8

strokeMethod · 0.95
tintMethod · 0.95
fillMethod · 0.95
ambientMethod · 0.95
specularMethod · 0.95
emissiveMethod · 0.95
backgroundMethod · 0.95
colorMethod · 0.95

Calls 1

colorCalcARGBMethod · 0.95

Tested by

no test coverage detected