SetTextCelColors

Sets background and foreground colors for a cel.

Synopsis

void SetTextCelColors (TextCel *tCel, int32 bgColor,int32 fgColors[4])

Description

Sets the background and foreground colors to use when the cel is drawn. This Function sets all four foreground colors; use it with features that allow multiple text colors within a single cel. Because of special internal logic that calculates scaled colors for anti-aliasing, you must use this function to change the colors, rather than manipulating the cel's PLUT directly. After you use this call to change the colors, the next DrawCels() call renders the contents already in the cel in new colors.

Colors follow the usual rules for 3DO cels. The bgColor and fgColor values are interpreted as RGB555 values. A color of 0,0,0 is transparent. To get opaque black, use MakeRGB15(0,0,1). If bgColor or any of the fgColors are passed as -1L, the corresponding values in the text cel remain unchanged.

When created, a TextCel has default colors of transparent for background, pure white for foreground pen 0, and no color (transparent) for foreground pens 1-3.

Arguments

tCel
Pointer to a TextCel structure.
bgColor
Background color, used by zero-value pixels in the character bitmap.
fgColor
Foreground colors, used by non-zero-value pixels in the character bitmap, according the TextCel's pen color value when the pixels were rendered.

Associated Files

lib3do.lib, textlib.h

See Also

SetTextCelColor