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

Method getColorValue

core/src/processing/opengl/PGL.java:1551–1559  ·  view source on GitHub ↗
(int scrX, int scrY)

Source from the content-addressed store, hash-verified

1549
1550
1551 protected int getColorValue(int scrX, int scrY) {
1552 if (colorBuffer == null) {
1553 colorBuffer = IntBuffer.allocate(1);
1554 }
1555 colorBuffer.rewind();
1556 readPixels(scrX, graphics.height - scrY - 1, 1, 1, RGBA, UNSIGNED_BYTE,
1557 colorBuffer);
1558 return colorBuffer.get();
1559 }
1560
1561
1562 protected float getDepthValue(int scrX, int scrY) {

Callers

nothing calls this directly

Calls 3

readPixelsMethod · 0.95
getMethod · 0.65
allocateMethod · 0.45

Tested by

no test coverage detected