draw_surface_stretched_ext

This function does exactly the same as the draw_surface_stretched function with the added ability to set the colour blending and alpha value for the surface when it is drawn (similar to the function 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.

TIP How a surface appears depends on its contents, especially the alpha values inside the surface. A surface cleared with an alpha of 0 may appear different from a surface cleared with an alpha of 1, due to the way they blend with the background. Take care of this whenever you notice a difference in the way something renders on a custom surface as opposed to the application_surface.

 

Syntax:

draw_surface_stretched_ext(surface, x, y, w, h, col, alpha);

ArgumentTypeDescription
surfaceSurfaceThe surface to draw.
xRealThe x position of where to draw the surface.
yRealThe y position of where to draw the surface.
wRealThe width at which to draw the surface.
hRealThe height at which to draw the surface.
colourColourThe colour with which to colour the surface.
alphaRealThe alpha with which to blend the surface.

 

Returns:

N/A

 

Example:

draw_surface_stretched_ext(surf, x, y, 200, 200, c_white, 0.5);

This will draw the given surface with its left corner at the instance's (x, y) position, stretched to occupy an area of 200x200 pixels, with no blending but partially transparent.