natiny.render.texture
natiny.render.texture(tex, x, y, w, h)
Draws a texture at the specified position and size using the current draw color.
Parameters
| Name | Type | Description |
|---|---|---|
tex |
number |
Texture handle from natiny.texture.create |
x |
number |
X position in pixels |
y |
number |
Y position in pixels |
w |
number |
Positive draw width in pixels |
h |
number |
Positive draw height in pixels |
Example
natiny.window.bind(win)
natiny.render.set_color(natiny.color.from_hex("#FFFFFF"))
natiny.render.texture(tex, 100.0, 50.0, 64.0, 64.0)
natiny.window.unbind()