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 _getimage( short x1, short y1,
                         short x2, short y2,
                         char _HUGE *image );

    void _FAR _getimage_w( double x1, double y1,
                           double x2, double y2,
                           char _HUGE *image );

    void _FAR _getimage_wxy( struct _wxycoord _FAR *p1,
                             struct _wxycoord _FAR *p2,
                             char _HUGE *image );

Description:
    The _getimage functions store a copy of an area of the screen into the
    buffer indicated by the image argument.  The _getimage function uses the
    view coordinate system.  The _getimage_w and _getimage_wxy functions use
    the window coordinate system.

    The screen image is the rectangular area defined by the points (x1,y1)
    and (x2,y2).  The buffer image must be large enough to contain the image
    (the size of the image can be determined by using the  _imagesize
    function).  The image may be displayed upon the screen at some later
    time by using the  _putimage functions.

Returns:
    The _getimage functions do not return a value.

See Also:
    _imagesize, _imagesize_w, _imagesize_wxy, _putimage, _putimage_w

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:
     _getimage - DOS, QNX

    _getimage_w - DOS, QNX
    _getimage_wxy - DOS, QNX

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