_putimage Functions

Description

Retrieve images from a buffer.

#include <graph.h>

void __far _putimage( short x, short y, const char __huge *image,
short action );

void __far _putimage_w( double wx, double wy, const char __huge *image,
short action );

x, y Position of upper-left corner of image  
image Stored image buffer  
action Interaction with existing screen image  
wx, wy Position of upper-left corner of image  

Remarks

The _putimage function transfers to the screen the image stored in the buffer that image points to.

In the _putimage function, the upper-left corner of the image is placed at the view coordinate point (x, y). In the _putimage_w function, the upper-left corner of the image is placed at the window coordinate point (wx, wy).

The action argument defines the interaction between the stored image and the one that is already on the screen. It may be any one of the following manifest constants (defined in GRAPH.H):

Constant Meaning

_GAND Transfers the image over an existing image on the screen. The resulting image is the logical-AND product of the two images: points that had the same color in both the existing image and the new one will remain the same color, while points that have different colors are joined by logical-AND.
_GOR Superimposes the image onto an existing image. The new image does not erase the previous screen contents.
_GPRESET Transfers the data point-by-point onto the screen. Each point has the inverse of the color attribute it had when it was taken from the screen by _getimage, producing a negative image.
_GPSET Transfers the data point-by-point onto the screen. Each point has the exact color attribute it had when it was taken from the screen by _getimage.
_GXOR Causes the points on the screen to be inverted where a point exists in the image buffer. This behavior is like that of the cursor: when an image is put against a complex background twice, the background is restored unchanged. This allows you to move an object around without erasing the background. The _GXOR constant is a special mode often used for animation.

Return Value

None. Use the _grstatus function to check the result of a call to the _putimage functions.

Compatibility

Standards:None

16-Bit:DOS

32-Bit:None

See Also

_getimage, _grstatus, _imagesize

Example

See the example for _getimage.