[Previous] [Contents] [Index] [Next]

PgSetAlphaBlend()

Set the parameters for alpha blending simply

Synopsis:

void PgSetAlphaBlend( 
        PgMap_t const * const src_alpha_map,
        unsigned char const src_alpha_value );

Library:

ph

Description:

PgSetAlphaBlend() sets the parameters for an alpha-blending operation.

The src_alpha_map argument is a pointer to the alpha map to be used in the blending operation. If this is NULL, the global blending factor, src_alpha_value, is used. For more information about the PgMap_t structure, see PgSetAlpha().

Examples:

// Draw a purple rectangle blended (at 25%) over top of 
// whatever is under it.
    
PgSetAlphaBlend(NULL, 0x40);    // 64 /256 = 0.25 or 25%
PgSetFillColor(Pg_PURPLE);
PgAlphaOn();
PgDrawIRect(0,0,99,99,Pg_DRAW_FILL);
PgAlphaOff();
PgFlush();

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgAlphaOff(), PgAlphaOn(), PgSetAlpha()

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


[Previous] [Contents] [Index] [Next]