Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PgARGB

PgARGB

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PgARGB()

Convert alpha, red, green, and blue values to composite color format

Synopsis:

PgColor_t PgARGB( int A,
                  int R,
                  int G,
                  int B );

Arguments:

A
The alpha value.
R
The red value.
G
The green value.
B
The blue value.

Library:

ph

Description:

This macro converts alpha, red, green, and blue values into a composite color value (of type PgColor_t). The values for alpha, red, green, and blue range from 0 to 255. If you set the red, green, and blue values to 0, the color is black; if you set them to 255, the color is white. The meaning of the alpha value depends on the alpha model that you're using.


Note: This macro doesn't check the color model currently in use, and gives undefined results if you're not using the Pg_CM_ARGB model.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgAlphaValue(), PgBlueValue(), PgColor_t, PgGreenValue(), PgRedValue(), PgRGB(), PgSetFillColor(), PgSetStrokeColor(), PgSetTextColor()

"Color" and "Alpha Blending Support" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide