drawText()
Purpose
Draw text on the screen
Description
Draw text on the screen at the specified location and size and in the specified colour
Syntax
drawText( x, y, size, colour, values )
Arguments
x horizontal position to start drawing text in pixels
y vertical position to start drawing text in pixels
size height of text in pixels
colour colour name or RGB values { red, green, blue, opacity } between 0 and 1
values A comma separated list of values to print
Example
for size = 1 to 200 step 1 loop
clear()
centreText( "Hello World", size )
update()
repeat
function centreText( message, size )
textSize( size )
tw = textWidth( message )
drawText( ( gWidth() - tw ) / 2, ( gHeight() - size ) / 2, size, white, message )
return void
Associated Commands
cursor(), ink(), len(), print(), printAt(), stringHash(), textSize(), tHeight(), tWidth()