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

Method colorCalc

core/src/processing/core/PGraphics.java:7631–7638  ·  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

7629 * of stroke or fill to more directly specify the desired result.
7630 */
7631 protected void colorCalc(int rgb) {
7632 if (((rgb & 0xff000000) == 0) && (rgb <= colorModeX)) {
7633 colorCalc((float) rgb);
7634
7635 } else {
7636 colorCalcARGB(rgb, colorModeA);
7637 }
7638 }
7639
7640
7641 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