draw_text_skewed - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
Draws the given string with top left corner placed at the given position using the drawing color and alpha.
A # symbol or carriage return chr(13) or linefeed chr(10) are interpreted as newline characters. Note that EDL string settings can allow you to use the \n escape sequence in place of the # symbol.
To change the text alignment you can use draw_set_valign and draw_set_halign functions.
Parameter | Data Type | Description |
---|---|---|
x | gs_scalar | x coordinate of the point to draw at |
y | gs_scalar | y coordinate |
str | variant | textual string to display |
top | gs_scalar | amount to skew the top of the text, can be positive or negative |
bottom | gs_scalar | amount to skew the bottom of the text, can be positive or negative |
void: This function does not return anything.
// drawing "Hello world!" at the 100,100 position.
draw_text(100, 100, "Hello world!");
// drawing centered "Hello world!" at the mouse position
draw_set_halign(fa_center);
draw_set_valign(fa_middle);
draw_text(mouse_x, mouse_y, "Hello world!");
// drawing a numeric value
// this will draw "You have 5 lives" if variable lives = 5
draw_text(100, 100, "You have " + string(lives) + " lives");
NOTOC