Skip to main content

renderer.texture

Draws a texture from the texture id created from load_rgba, load_png, load_jpg or load_svg

renderer.texture(texture: number, x: number, y: number, w: number, h: number, r: number, g: number, b: number, a: number, mode: string)

Arguments

NameDescriptionType
textureTexture IDnumber
xX screen coordinatenumber
yY screen coordinatenumber
wWidthnumber
hHeightnumber
rRed color component (0 to 255)number
gGreen color component (0 to 255)number
bBlue color component (0 to 255)number
aAlpha (opacity) component (0 to 255)number
mode"f" for filled, "r" for repeat, otherwise automaticstring