natiny.surface.resize
natiny.surface.resize(surf, width, height)
Replaces a surface's attachments with new attachments of the requested size.
Parameters
| Name | Type | Description |
|---|---|---|
surf |
number |
Surface handle from natiny.surface.create |
width |
number |
New surface width in pixels |
height |
number |
New surface height in pixels |
Example
natiny.surface.resize(surf, 1920, 1080)
Notes
- If allocation fails, the surface is left at the size it already had and stays usable.