Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    void _FAR _putimage( short x, short y,
                         char _HUGE *image, short mode );

    void _FAR _putimage_w( double x, double y,
                           char _HUGE *image, short mode );

Description:
    The _putimage functions display the screen image indicated by the
    argument image.  The _putimage function uses the view coordinate system.
     The _putimage_w function uses the window coordinate system.

    The image is displayed upon the screen with its top left corner located
    at the point with coordinates (x,y).  The image was previously saved
    using the  _getimage functions.  The image is displayed in a rectangle
    whose size is the size of the rectangular image saved by the  _getimage
    functions.

    The image can be displayed in a number of ways, depending upon the value
    of the mode argument.  This argument can have the following values:

    _GPSET
        replace the rectangle on the screen by the saved image

    _GPRESET
        replace the rectangle on the screen with the pixel values of the
        saved image inverted; this produces a negative image

    _GAND
        produce a new image on the screen by ANDing together the pixel
        values from the screen with those from the saved image

    _GOR
        produce a new image on the screen by ORing together the pixel values
        from the screen with those from the saved image

    _GXOR
        produce a new image on the screen by exclusive ORing together the
        pixel values from the screen with those from the saved image; the
        original screen is restored by two successive calls to the _putimage
        function with this value, providing an efficient method to produce
        animated effects


Returns:
    The _putimage functions do not return a value.

See Also:
    _getimage, _getimage_w, _getimage_wxy, _imagesize, _imagesize_w, _imagesize_wxy

Example:
    #include <conio.h>
    #include <graph.h>
    #include <malloc.h>

    main()
    {
        char *buf;
        int y;

        _setvideomode( _VRES16COLOR );
        _ellipse( _GFILLINTERIOR, 100, 100, 200, 200 );
        buf = malloc( _imagesize( 100, 100, 201, 201 ) );
        if( buf != NULL ) {
            _getimage( 100, 100, 201, 201, buf );
            _putimage( 260, 200, buf, _GPSET );
            _putimage( 420, 100, buf, _GPSET );
            for( y = 100; y < 300; ) {
                _putimage( 420, y, buf, _GXOR );
                y += 20;
                _putimage( 420, y, buf, _GXOR );
            }
            free( buf );
        }
        getch();
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
     _putimage - DOS, QNX

    _putimage_w - DOS, QNX

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson