Draw an image that's contained in a PhImage_t structure
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 );
ph
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:
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().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
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