-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.DrawTexturePro
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Draw a part of a texture (defined by a rectangle) with 'pro' parameters NOTE: origin is relative to destination rectangle size
| Parameter | Default Value | Note |
|---|---|---|
| texture | ||
| source | ||
| dest | ||
| origin | [0, 0] | |
| rotation | 0 | |
| tint | WHITE |
None.
tex = raylib.LoadTexture("sprite.png")
src = {x:0, y:0, width:64, height:64}
dst = {x:100, y:100, width:128, height:128}
raylib.BeginDrawing
raylib.ClearBackground raylib.BLACK
raylib.DrawTexturePro tex, src, dst, [0, 0], 0, raylib.WHITE
raylib.EndDrawing
raylib.UnloadTexture tex