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_native()

Replace the foreground rendering color

Synopsis:

#include <gf/gf.h>

void gf_context_set_fgcolor_native(
        gf_context_t context,
        unsigned color );

Arguments:

context
The draw context to set the color for.
color
The new foreground color, in native format (see below).

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.

This variant of gf_context_set_fgcolor() bypasses the color conversion routines and takes the color in native form. To effectively use this function, you must be aware of the target surface's pixel format and how data is encoded in that format. See gf_format_t for more details on data encoding for the different supported formats.


Note: Unlike gf_context_set_fgcolor(), setting a color using this function is not persistent. If you switch surfaces using gf_context_set_surface(), then the setting will be lost, and foreground color will be recalculated based on the last setting made using gf_context_set_fgcolor().

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(), gf_format_t