Skip to content

surface_get_pixels

Vašek edited this page Jan 16, 2019 · 1 revision

surface_get_pixels

Returns all colors from the surface

Syntax:

surface_get_pixels(surface_id)
Argument Description
RenderTarget2D surface_id The ID of the surface

Returns: Color[]

Description:

This function returns the colors of all pixels from a surface and stores them in an array.

Example:

Color[] col = surface_get_pixels(surf);

This will return the colors of pixels from the surface called surf and store them in the array col.

Back to surfaces

Clone this wiki locally