Skip to content

surface_save

Vašek edited this page Jan 18, 2019 · 3 revisions

surface_save

Saves a surface in a png format

Syntax:

surface_save(surface_id, fname)
Argument Description
RenderTarget2D surface_id The ID of the surface
string fname Name for the surface

Returns: void

Description:

This function saves a surface like a picture in a png format.

Example:

RenderTarget2D surf = surface_create(2048, 2048);
surface_save(surf, "surface0");

This function will create new surface surf and then save it like a file called surface0.png.

Back to surfaces

Clone this wiki locally