-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.DrawTextureNPatch
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draws a texture (or part of it) that stretches or shrinks nicely using n-patch info
| Parameter | Default Value | Note |
|---|---|---|
| texture | ||
| nPatchInfo | ||
| dest | ||
| origin | [0, 0] | |
| rotation | 0 | |
| tint | WHITE |
None.
tex = raylib.LoadTexture("panel.png")
npi = {source: {x:0, y:0, width:64, height:64}, left:8, top:8, right:8, bottom:8, layout:0}
dest = {x:50, y:50, width:200, height:100}
raylib.BeginDrawing
raylib.ClearBackground raylib.BLACK
raylib.DrawTextureNPatch tex, npi, dest, [0, 0], 0, raylib.WHITE
raylib.EndDrawing
raylib.UnloadTexture tex