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

Method getStencilValue

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

Source from the content-addressed store, hash-verified

1571
1572
1573 protected byte getStencilValue(int scrX, int scrY) {
1574 if (stencilBuffer == null) {
1575 stencilBuffer = ByteBuffer.allocate(1);
1576 }
1577 stencilBuffer.rewind();
1578 readPixels(scrX, graphics.height - scrY - 1, 1, 1, STENCIL_INDEX,
1579 UNSIGNED_BYTE, stencilBuffer);
1580 return stencilBuffer.get(0);
1581 }
1582
1583
1584 protected static boolean isPowerOfTwo(int val) {

Callers

nothing calls this directly

Calls 3

readPixelsMethod · 0.95
getMethod · 0.65
allocateMethod · 0.45

Tested by

no test coverage detected