natiny.surface.get_width

Lua
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

Lua
local w = natiny.surface.get_width(rt)