draw_sprite_stretched_ext(sprite, subimg, x, y, w, h, colour, alpha);
参数 | 描述 |
---|---|
sprite | The index of the sprite to draw. |
subimg | The subimg (frame) of the sprite to draw (image_index or -1 correlate to the current frame of animation in the object). |
x | The x coordinate of where to draw the sprite. |
y | The y coordinate of where to draw the sprite. |
w | The width of the area the stretched sprite will occupy. |
h | The height of the area the stretched sprite will occupy. |
colour | The colour with which to blend the sprite. c_white is to display it normally. |
alpha | The alpha of the sprite (from 0 to 1 where 0 is transparent and 1 opaque). |
返回: N/A(无返回值)
This function does exactly the same as the draw_sprite_stretched function with the added ability to set the colour blending and alpha value for the sprite when it is drawn (similar to the function draw_sprite_ext).
draw_sprite_stretched_ext(sprite_index, image_index, x, y, sprite_width / 2, sprite_height / 2, c_white, 0.5);
This will draw the instances assigned sprite and its sub-image with the left corner at the instance x /y position. Its width is set to the same as the sprite, and the height is the sprite height divided by two. It will also be blended normally but have a partially transparent alpha value.