Draws text to the screen. Displays the information specified in the first parameter on the screen in the position specified by the additional parameters. A default font will be used unless a font is set with the textFont() function and a default size will be used unless a font is set with
(char c, float x, float y)
| 4675 | * @see_external String |
| 4676 | */ |
| 4677 | public void text(char c, float x, float y) { |
| 4678 | if (textFont == null) { |
| 4679 | defaultFontOrDeath("text"); |
| 4680 | } |
| 4681 | |
| 4682 | if (textAlignY == CENTER) { |
| 4683 | y += textAscent() / 2; |
| 4684 | } else if (textAlignY == TOP) { |
| 4685 | y += textAscent(); |
| 4686 | } else if (textAlignY == BOTTOM) { |
| 4687 | y -= textDescent(); |
| 4688 | //} else if (textAlignY == BASELINE) { |
| 4689 | // do nothing |
| 4690 | } |
| 4691 | |
| 4692 | textBuffer[0] = c; |
| 4693 | textLineAlignImpl(textBuffer, 0, 1, x, y); |
| 4694 | } |
| 4695 | |
| 4696 | |
| 4697 | /** |
nothing calls this directly
no test coverage detected