This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Replace the foreground rendering color
#include <gf/gf.h> gf_color_t gf_context_set_fgcolor( gf_context_t context, gf_color_t color );
gf
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.
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. |
The previous foreground color.
QNX Graphics Framework
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
gf_context_set_bgcolor(), gf_context_set_bgcolor_native(), gf_context_set_fgcolor_native()