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


Home
QNX Community Resources
QNX Documentation Library
PgCMY

PgCMY

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

PgCMY()

Convert cyan, magenta, and yellow values to composite color format

Synopsis:

PgColor_t PgCMY( int C, int M, int Y );

Arguments:

C
The cyan component.
M
The magenta component.
Y
The yellow component.

Library:

ph

Description:

This macro converts cyan, magenta, and yellow values into a PgColor_t structure. It lets you approximate print-industry colors. The values for C, M, and Y range from 0 to 255. If you set all three arguments to 0, the color is white; if you set all three to 255, the color is black.

Returns:

A composite color value.

Examples:

Color Composite color value
Black PgCMY( 255, 255, 255 );
White PgCMY( 0, 0, 0 );
Red PgCMY( 0, 255, 255 );
Green PgCMY( 255, 0, 255 );
Blue PgCMY( 255, 255, 0 );
Orange PgCMY( 0, 90, 255 );
Slate Blue PgCMY( 175, 160, 121 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgColor_t, PgBlueValue(), PgGreenValue(), PgHSV(), PgRedValue(), PgRGB(), PgSetFillColor(), PgSetFillDither()

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