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

Method javaToNativeARGB

core/src/processing/opengl/PGL.java:1768–1775  ·  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

1766 * BGRA on little endian).
1767 */
1768 protected static int javaToNativeARGB(int color) {
1769 if (BIG_ENDIAN) { // ARGB to RGBA
1770 return (color >>> 24) | (color << 8);
1771 } else { // ARGB to ABGR
1772 int rb = color & 0x00FF00FF;
1773 return (color & 0xFF00FF00) | (rb << 16) | (rb >> 16);
1774 }
1775 }
1776
1777
1778 /**

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