draw_background_stretched

Draws a background at a given position, stretched.

Syntax:

GML Code Example

draw_background_stretched(back, x, y, w, h);


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.


Returns: N/A


Description

This function simply takes a background resource and stretches it over the given width and height so that it occupies the area. As with draw_background you can specify a background and then the x / y position in the room for the background to be drawn at and finally a width and a height (which must be pixel values).


Example:

GML Code Example

draw_background_stretched(bck_Sky, 10, 10, 100, 100);

This will draw background0 with its left corner at (10,10). Its width and height are both set to 100, which is how much space it will occupy regardless of the background's actual width and height.





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