natiny.texture.get_width
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
local w = natiny.texture.get_width(tex)