readPixelColors

fun readPixelColors(x: Int, y: Int, width: Int, height: Int): Set<Color>

Reads the unique fragment colors within a screen rectangle in the currently active OpenGL frame buffer. The components indicate OpenGL screen coordinates, which originate in the frame buffer's lower left corner.

Return

a set containing the unique fragment colors

Parameters

x

the screen rectangle's X component

y

the screen rectangle's Y component

width

the screen rectangle's width

height

the screen rectangle's height