String_width_ext_line - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
NOTOC
Notation
Description
Returns the width of a specific line in a multiline string. line starts at 0 (so 0 is the first line, 1 is the second and so on). w is the width of the text in pixels. Lines that are longer than this width are split up at spaces. Use -1 to not split up lines. To know how many lines does the string have you can use .
Parameters
- string: The string for which the width should be returned.
- w: Width of the text in pixels. Lines that are longer than this width are split up at spaces. Use -1 to not split up lines.
- line: The line for which the width should be returned.
Return Values
Returns the width in pixels.
Example Call
//draws a line above the first line of the string
draw_text_ext(10,10,"Some text that is quite long and keeps on going",-1,200);
w=string_width_ext_line("Some text that is quite long and keeps on going",200,0);
draw_line(10,10,10+w,10);