natiny.texture.get_width

Lua
natiny.texture.get_width(tex) -> width

Returns the texture width in pixels.

Parameters

Name Type Description
tex number Texture handle from natiny.texture.create

Returns

Type Description
number Width in pixels, or 0 for an invalid handle

Example

Lua
local w = natiny.texture.get_width(tex)