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


GML Code Example

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


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.


GML Code 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.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here