Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

gf_context_set_fgcolor()

Replace the foreground rendering color

Synopsis:

#include <gf/gf.h>

gf_color_t gf_context_set_fgcolor( gf_context_t context,
                                   gf_color_t color );

Arguments:

context
The draw context to set the color for.
color
The new foreground color, in packed ARGB8888 format.

Library:

gf

Description:

This function replaces the foreground color for the given graphics context. The foreground color applies to most draw operations, such as lines, filled rectangles and polygons, bitmaps, and so on.


Note: Make sure you set the upper 8 bits (the alpha channel) in the color argument to 0xFF to ensure that objects drawn in the frame buffer have the correct opacity associated with them.

For example, if the frame buffer surface includes an alpha component, objects drawn without opacity may not show up in a multi-layered environment.


Returns:

The previous foreground color.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_context_set_bgcolor(), gf_context_set_bgcolor_native(), gf_context_set_fgcolor_native()