GD drawChar()
syntax: |
gd.drawChar(font, x, y, char, color) gd.drawChar(font, point, char, color) |
where: |
font - Font specification
x - horizontal position of upper-left corner of character
y - vertical position of upper-left corner of character
point - Point specification.
char - The specified character to draw
color - color index or style to use
|
return: |
void.
|
description: |
This method draws a character in the image at the specified location in the appropriate font. If the coordinates are out of bounds, then no drawing is done. The reason that it is named 'drawChar' and not simply 'char' is that 'char' is a reserved keyword and an invalid variable name.
|
see: |
#link <gd>, GD charUp(), GD string()
|
example: |
// Write "hi" at the starting position var gd = new GD(50,50); gd.drawChar( GD.fontSmall, 5, 5, "h", 0 ); gd.drawChar( GD.fontSmall, [11,5], "i", 0 ); // This is the equivalent of GD.string() // with the string "hi" |