PgBackgroundShadings()

Calculate top and bottom shading colors

Synopsis:

void PgBackgroundShadings( PgColor_t bg, 
                           PgColor_t *ts,
                           PgColor_t *bs);

Arguments:

bg
A PgColor_t object that specifies the background color that you want to base the shading colors on.
ts
NULL, or a pointer to a PgColor_t object where the function stores the calculated top shading color.
bs
NULL, or a pointer to a PgColor_t object where the function stores the calculated bottom shading color.

Library:

ph

Description:

This function calculates the top and bottom shading colors that may be used in a border to give an object a 3D appearance. Where possible (based on the brightness of the background color), the top border color is lighter than the background and the bottom border color is darker than the background. Either of ts or bs may be NULL if that component isn't required.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgCalcColorContrast(), PgColor_t

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