Category: Images and Rendering
DrawSpriteEx(spriteReference As Integer, frameIndex As Integer, x As Integer, y As Integer, rotation As Double)
DrawSpriteEx(spriteReference As Integer, frameIndex As Integer, x As Integer, y As Integer, rotation As Double, scale As Double)
Void
Queues a sprite frame like DrawSprite, but also rotates it and optionally scales it uniformly.
The rotation is measured in degrees and is centered on the current sprite hotspot. When scale is omitted, it defaults to 1.0.
The frameIndex argument is zero-based.
hero = LoadSprite("player.png", 32, 32)
SetSpriteHotspot(hero, 15, 15)
DrawSpriteEx(hero, 0, 160, 120, 45)
DrawSpriteEx(hero, 0, 160, 120, 90, 1.5)