draw_sprite_ext
From ENIGMA
A more extensive function for drawing sprites.
This function is part of the function set Drawing sprites
Notation
draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,alpha)
Description
Draw a sprite with scaling, rotation, blending, and alpha.
Parameters
- sprite The index of the sprite to be drawn.
- subimg The index of the sprite's subimage to draw.
- x The x coordinate at which to draw the sprite.
- y The y coordinate at which to draw the sprite.
- xscale The horizontal stretch factor with which to draw the sprite. The stretch is performed before rotation.
- yscale The vertical stretch factor with which to draw the sprite. The stretch is performed before rotation.
- rot The angle to which the sprite will be rotated for draw.
- color The color with which to blend the image. Black will remain black, but white will become the given color.
- alpha The opacity with which to draw the sprite. A value of zero is fully transparent; a value of one is fully opaque.
Return Values
In Game Maker, the return value was zero. Nothing is returned in ENIGMA.
Example Call
// This is the default sprite drawing call, and before the advent of draw_self, the most common sprite call in GML.
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha);
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha);