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/pgsetchroma.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/pgsetchroma.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/pgsetchroma.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/pgsetchroma.html on line 8
Set the chroma color and operation
void PgSetChroma( PgColor_t ChromaColor,
unsigned long ChromaOp );
void PgSetChromaCx( PhGC_t *gc,
PgColor_t ChromaColor,
unsigned long ChromaOp );
ph
These functions set the current chroma color and defines the chroma
operation.
PgSetChroma() works on the current graphics context,
while you can specify the graphics context gc for
PgSetChromaCx().
ChromaColor is the color to test against for chroma operations.
ChromaOp is made up of the following bits:
- Pg_CHROMA_SRC_MATCH
- Test against the source data.
- Pg_CHROMA_DEST_MATCH
- Test against the destination data.
- Pg_CHROMA_DRAW
- If the test pixel matches the chroma color, draw it in the destination.
- Pg_CHROMA_NODRAW
- If the test pixel matches the chroma color, don't draw it in the
destination.
// Draw an image using a chroma color of full green
PhImage_t *image;
PhPoint_t p={0,0};
// Code to load the image...
…
PgChromaOn();
// Set the chroma operation to copy every pixel in the source to
// the destination, except the color 0x0000FF00 (bright green)
PgSetChroma(0x0000FF00, Pg_CHROMA_SRC_MATCH | Pg_CHROMA_NODRAW);
PgDrawPhImagemx(&p,image,0);
PgChromaOff();
PgFlush();
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PgChromaOff*(),
PgChromaOn*(),
PgColor_t,
“Chroma key 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/pgsetchroma.html on line 146
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/pgsetchroma.html on line 146