| Line 1: |
Line 1: |
| − | #REDIRECT [[drawString]]
| + | '''drawString ''' is a function that is part of [[:Category:gc|gc]] (Graphics Context). |
| | + | |
| | + | <br /> |
| | + | == Syntax == |
| | + | gc:'''drawString'''(string, x, y [,position]) |
| | + | |
| | + | {| class="wikitable" |
| | + | |- |
| | + | ! Parameter !! Type !! Description |
| | + | |- |
| | + | | <u>string</u> || string || The text to display |
| | + | |- |
| | + | | <u>x</u> || number || the ''x'' coordinate of the beginning of the string. Relative to ''position''. |
| | + | |- |
| | + | | <u>y</u> || number || the ''y'' coordinate of the beginning of the string. Relative to ''position''. |
| | + | |- |
| | + | | <u>position</u> || string || the string’s anchor point. It can either be "baseline", “bottom”, “middle”, or “top”. |
| | + | |} |
| | + | == Example == |
| | + | <syntaxhighlight>gc:drawString("Hello World", 0, 0, "top")</syntaxhighlight> |
| | + | will display Hello World at the top-left part of the screen. |
| | + | |
| | + | <br /><br /> |
| | + | [[Category:gc]] |