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/pgdrawphimage.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/pgdrawphimage.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/pgdrawphimage.html on line 9

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/pgdrawphimage.html on line 9

PgDrawPhImage(), PgDrawPhImagev(), PgDrawPhImageCx(), PgDrawPhImageCxv()

Draw an image that's contained in a PhImage_t structure

Synopsis:

int PgDrawPhImage( PhPoint_t const *pos,
                   PhImage_t const *image,
                   int flags );

int PgDrawPhImagev( PhPoint_t const *pos,
                     PhImage_t const *image,
                     int flags );

int PgDrawPhImageCx( void *dc,
                     PhPoint_t const *pos,
                     PhImage_t const *image,
                     int flags );

int PgDrawPhImageCxv( void *dc,
                      PhPoint_t const *pos,
                      PhImage_t const *image,
                      int flags );

Library:

ph

Description:

These functions draw the provided image at the position specified in the PhPoint_t structure pointed to by pos. The image parameter must be a pointer to a PhImage_t structure that defines the image to be rendered.

If the image has a transparency mask, it's used. These functions set the palettes for palette-based images, and apply alpha blending if the alpha member of the PhImage_t structure isn't NULL.

You can pass the following bit in the flags argument:

Pg_GHOST or Pt_GHOST
Render the image using the ghost bitmap as a transparency mask.

Note: If you call the “v” forms of this function, the data isn't physically copied into the draw buffer. Instead, a pointer to the image is stored until the draw buffer is flushed. Make sure you call PgFlush() before you modify the image.

If the data is in shared memory, the “v” forms of this function automatically pass a shared memory reference instead of the image.


PgDrawPhImage() and PgDrawPhImagev() work on the current draw context, while you can specify the draw context dc for PgDrawPhImageCx() and PgDrawPhImageCxv().

Returns:

0
Success.
-1
The draw buffer couldn't be resized enough to fit a single scan line of the image (insufficient memory).

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApGetImageRes(), PgDrawPhImageRect*v(), PgDrawRepPhImage*(), PgFlush*(), PhCreateImage(), PhImage_t, PhMakeGhostBitmap(), PhMakeTransBitmap(), PhMakeTransparent(), PhPoint_t, PhReleaseImage(), PmMemCreateMC(), PmMemFlush(), PxLoadImage()

Images 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/pgdrawphimage.html on line 181

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/pgdrawphimage.html on line 181