Draws a string with scaling and rotation.


draw_text_transformed(x, y, string, xscale, yscale, angle);

Argument Description
x The x coordinate of the drawn string.
y The y coordinate of the drawn string.
string The string to draw.
xscale The horizontal scale (default 1).
yscale The vertical scale(default 1).
angle The angle of the text.

Returns: N/A


This function will draw text in a similar way to draw_text only now you can choose to scale the text along the horizontal or vertical axis (effectively stretching or shrinking it) and also have GameMaker: Studio draw it at an angle (where 0 is normal and every degree over 0 rotates the text anti-clockwise).


image_angle += 1;
draw_text_transformed(room_width / 2, room_height / 2, "GAME OVER!", 2, 2, image_angle);

The above code will draw the given text in the middle of the room, spinning round and scaled to twice its original size.

Back: Drawing Text
Next: draw_text_ext_colour
© Copyright YoYo Games Ltd. 2018 All Rights Reserved