DrawImage

Draw a texture on screen with optional tint, rounding, and UVs.

Syntax

Susano.DrawImage(texId, x, y, w, h [, r,g,b,a [, rounding [, u0,v0,u1,v1]]]) -> void

Parameters

texId (number): Texture handle.

x, y (number): Top-left in screen pixels.

w, h (number): Size in pixels.

r, g, b, a (number, optional): Tint color. Default 1,1,1,1.

rounding (number, optional): Corner radius in px. Default 0.

u0, v0, u1, v1 (number, optional): UV rectangle. Default 0,0,1,1.

Return(s)

None

Behavior

Draws via ImGui AddImage (or AddImageRounded when rounding>0).

Uses the exact pixels of w x h; no aspect correction.

UVs allow cropping or atlas regions.

Fails if texId is invalid or released.

Example(s)

Last updated