Skip to content

raylib.ImageDrawImageEx

JoeStrout edited this page Oct 17, 2026 · 1 revision

Draw an image with scaling and rotation within an image NOTE: Rotation applied from top-left corner origin

Parameters

Parameter Default Value Note
dst
src
position [0, 0]
rotation 0
scale 1.0
tint WHITE

Return value

None.

Notes

rotation is in degrees, applied around the top-left corner of the source image (which is placed at position). Sampling is nearest-neighbor.

Example

dst = raylib.GenImageColor(128, 128, raylib.BLACK)
src = raylib.GenImageColor(32, 16, raylib.RED)
// Draw src rotated 45 degrees, at 2x scale
raylib.ImageDrawImageEx dst, src, [40, 10], 45, 2
raylib.UnloadImage src
raylib.ExportImage dst, "rotated.png"
raylib.UnloadImage dst

Clone this wiki locally