DrawTextChar

Draws a character into a bitmap.

Synopsis

void DrawTextChar (FontDescriptor *fDesc, GrafCon *gcon, Item bitmapItem, uint32 character)

Description

Draws a character directly into a bitmap, using the colors and x/y coordinates specified in the GrafCon.

The GrafCon's pen coordinates are interpreted as integer (not Frac16) values. The call updates the GrafCon's gc_PenX and gc_PenY fields to reflect the space the character pixels occupy within the bitmap. A newline character moves the gc_PenY value down by the font's height+leading value and sets the gc_PenX value to zero.

The foreground and background colors follow the usual rules for cels: A color of 000 results in transparent output, for opaque black use 001.

This function is an extremely inefficient way to get characters onto the screen. To draw more than one character, use the DrawTextString() or TextCel functions.

Arguments

fDesc
Pointer to a FontDescriptor structure.
gcon
Pointer to a GrafCon structure containing the foreground and background colors and pen x/y coordinates to use in rendering the character.
bitmapItem
Bitmap into which the character is rendered.
character
Character to render.

Associated Files

lib3do.lib, textlib.h

See Also

DrawTextString