Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgsetalphablend.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgsetalphablend.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgsetalphablend.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgsetalphablend.html on line 8

PgSetAlphaBlend(), PgSetAlphaBlendCx()

Set the parameters for alpha blending simply

Synopsis:

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

void PgSetAlphaBlendCx(
        PhGC_t *gc,
        PgMap_t const * const src_alpha_map,
        unsigned char const src_alpha_value );

Library:

ph

Description:

These functions set the parameters for an alpha-blending operation.

Calling PgSetAlphaBlend*() is equivalent to calling PgSetAlpha*() with Pg_BLEND_SRC_As and Pg_BLEND_DST_1mAs as the source and destination multipliers.

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 PgMap_t.

PgSetAlphaBlend() works on the current graphics context, while you can specify the graphics context gc for PgSetAlphaBlendCx().

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(), PgMap_t, PgSetAlpha()

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


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pg/pgsetalphablend.html on line 126

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pg/pgsetalphablend.html on line 126