natiny.surface.get_width
natiny.surface.get_width(surf) -> width
Returns the surface width in pixels.
Parameters
| Name | Type | Description |
|---|---|---|
surf |
number |
Surface handle from natiny.surface.create |
Returns
| Type | Description |
|---|---|
number |
Width in pixels, or 0 for an invalid handle |
Example
local w = natiny.surface.get_width(rt)