New in 2.2.0
Parameter | Type | Description |
pos | int[2] | The screen coordinates of the pixel to read. |
buf | int | The buffer whose contents should be read from. |
Type | Description |
int[3] | A list of 3 ints in the range 0-255 composing the RGB color of the pixel. |
Retrieves the color of a screen pixel at a given coordinate in the given buffer.
Name | Description |
FRONT | Front buffer |
BACK | Back buffer |
STENCIL | Stencil buffer |
DEPTHBUF | Depth buffer |
import agan
class game():
def create(self):
return self
#
def update(self):
pix = agan.getpix([ 50, 100 ], agan.BACK)
agan.log('RGB @ (50, 100):')
agan.log(pix[0])
agan.log(pix[1])
agan.log(pix[2])
#
def close(self):
pass