Warning: This site is under construction, most links will be broken.
LightX API -> lxgfx -> getpixel
Last modified on Thu, 29th Mar 2007 at 17:52 UTC by zippletlxgfx.getpixel
function getpixel(
surface: tlxhandle;
x, y: tlxposition;
): tlxcolour32;
Return the colour of a pixel at the given co-ordinates.
If you will be reading a lot of pixels, consider locking the surface and directly manipulating it's image buffer instead. Calling getpixel repeatedly is very slow since it must lock and unlock the surface for every pixel read and there is the overhead of one function call per pixel too.
surface: tlxhandle
The surface to read from.
x, y: tlxposition
The X,Y co-ordinates to read from.
Class: lxgfx