You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Graphics Library > drawString

9.7 drawString

gc:drawString("text", x, y [,vertalignment])

Draws text on the window beginning at pixel location (x,y). Vertical alignment may be “baseline”, “bottom”, “middle”, or “top”. This aligns the text in the height of the characters’ bounding rectangle.
Prior to platform.apiLevel = '2.3' “none” was used to specify unspecified alignment. The vertical alignment “none” has been deprecated. Specifying no alignment defaults to “top” and so does “none”.

Returns the x pixel position after the text.

Introduced in platform.apiLevel = '1.0'

Extended in platform.apiLevel = ‘2.3’