draw_surface_tiled_ext

Draws a surface at a given position with scaling, blending and alpha, and tiles it to fill the entire room.

Syntax:

GML Code Example

draw_surface_tiled_ext(back, x, y, xscale, yscale, colour, alpha);


Argument Description
back The index of the surface to draw.
x The x coordinate of where to draw the surface.
y The y coordinate of where to draw the surface.
xscale The horizontal scaling of the surface.
yscale The vertical scaling of the surface.
h The height of the area the stretched surface will occupy.
colour The colour with which to blend the surface.
alpha The alpha of the surface.


Returns: N/A


Description

This function will take a surface and then repeatedly tile it across the whole room, starting from the coordinates that you give in the function and with each tile scaled, colour blended and with the alpha that you define (these properties are the same as those used in draw_surface_ext).

NOTE: When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should ALWAYS check that a surface exists using surface_exists before referencing them directly. For further information see Surfaces.


Example:

GML Code Example

draw_surface_tiled_ext(surf, x, y, 2, 2, c_red, 0.5);

This will draw the surface indexed in "surf" at the instances own x and y position, double its stored size and tiled in every direction in the room, as well as blended with the colour red and partially transparent.





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