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>
    long _FAR _imagesize( short x1, short y1,
                          short x2, short y2 );

    long _FAR _imagesize_w( double x1, double y1,
                            double x2, double y2 );

    long _FAR _imagesize_wxy( struct _wxycoord _FAR *p1,
                              struct _wxycoord _FAR *p2 );

Description:
    The _imagesize functions compute the number of bytes required to store a
    screen image.  The _imagesize function uses the view coordinate system.
     The _imagesize_w and _imagesize_wxy functions use the window coordinate
    system.

    The screen image is the rectangular area defined by the points (x1,y1)
    and (x2,y2).  The storage area used by the  _getimage functions must be
    at least this large (in bytes).

Returns:
    The _imagesize functions return the size of a screen image.

See Also:
    _getimage, _getimage_w, _getimage_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:
     _imagesize - DOS, QNX

    _imagesize_w - DOS, QNX
    _imagesize_wxy - DOS, QNX

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