DrawSpriteEx
Category: Images and Rendering
Signature
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)
Returns
Void
Description
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.
Example
hero = LoadSprite("player.png", 32, 32)
SetSpriteHotspot(hero, 15, 15)
DrawSpriteEx(hero, 0, 160, 120, 45)
DrawSpriteEx(hero, 0, 160, 120, 90, 1.5)