Skip to content

surface_resize

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

surface_resize

Resize an existing surface

Syntax:

surface_resize(surface_id, w, h)
Argument Description
RenderTarget2D surface_id The ID of the surface to resize
int w The height of the surface
int h The height of the surface

Returns: void

Description:

This function will resize a surface to the given dimensions. The surface_id is the name of the surface you created before and its necessary to add a keyword ref before the surface_id. This function simply destroys the current surface and recreates it with the same handle (surface_id) with the new dimensions.

Example:

surface_resize(ref surf, 2048, 2048);

This code will recreate the surface called surf and set width and height to 2048.

Back to surfaces

Clone this wiki locally