Returns the color of the pixel at the position in the surface
surface_get_pixel(surface_id, x, y)
RenderTarget2D
int
Returns: Color
Color
This function returns the color of a specific pixel from a surface, using the coordinates x, y.
x, y
Note: This function is extremely slow and may cause a pause in your game.
Color col = surface_get_pixel(surf, 128, 128);
This will return the colour of the pixel at coordinates (128,128) of the surface called surf and save it to variable col.
surf
col
Back to surfaces
There was an error while loading. Please reload this page.