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

Method javaToNativeARGB

core/src/processing/opengl/PGL.java:1723–1730  ·  view source on GitHub ↗

Converts input Java ARGB value to native OpenGL format (RGBA on big endian, BGRA on little endian).

(int color)

Source from the content-addressed store, hash-verified

1721 * BGRA on little endian).
1722 */
1723 protected static int javaToNativeARGB(int color) {
1724 if (BIG_ENDIAN) { // ARGB to RGBA
1725 return (color >>> 24) | (color << 8);
1726 } else { // ARGB to ABGR
1727 int rb = color & 0x00FF00FF;
1728 return (color & 0xFF00FF00) | (rb << 16) | (rb >> 16);
1729 }
1730 }
1731
1732
1733 /**

Callers 15

drawPixelsMethod · 0.95
addVertexMethod · 0.95
setStrokeColorMethod · 0.95
setFillImplMethod · 0.95
setFillMethod · 0.95
setTintImplMethod · 0.95
setTintMethod · 0.95
setStrokeImplMethod · 0.95
setStrokeMethod · 0.95
setAmbientImplMethod · 0.95
setAmbientMethod · 0.95
setSpecularImplMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected