draw_background_stretched_ext

Draws a background at a given position, stretched, and allows for a custom blend and alpha.

Syntax:

draw_background_stretched_ext(back, x, y, w, h, colour, alpha);


Argument Description
back The index of the background to draw.
x The x coordinate of where to draw the background.
y The y coordinate of where to draw the background.
w The width of the area the stretched background will occupy.
h The height of the area the stretched background will occupy.
colour The colour with which to blend the background (use -1 or c_white to display it normally).
alpha The alpha of the background (from 0 to 1 where 0 is transparent and 1 opaque).


Returns: N/A


Description

This function does exactly the same as the draw_background_stretched function with the added ability to set the colour blending and alpha value for the background when it is drawn (similar to the function draw_background_ext).

NOTE: Blending is not available for the HTML5 target unless WebGL is enabled.


Example:

draw_background_stretched_ext(bck_Sky, x, y, 200, 200, c_white, 0.5);

This will draw the given background with its left corner at the instances x/y position and it will be stretched to occupy an area of 200x200 pixels with no blending, but partial transparency.


Back: Drawing Sprites And Backgrounds
Next: draw_background_tiled
© Copyright YoYo Games Ltd. 2018 All Rights Reserved