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

Description:
    The _getcliprgn function returns the location of the current clipping
    region.  A clipping region is defined with the  _setcliprgn or
     _setviewport functions.  By default, the clipping region is the entire
    screen.

    The current clipping region is a rectangular area of the screen to which
    graphics output is restricted.  The top left corner of the clipping
    region is placed in the arguments (x1,y1).  The bottom right corner of
    the clipping region is placed in (x2,y2).

Returns:
    The _getcliprgn function returns the location of the current clipping
    region.

See Also:
    _setcliprgn, _setviewport

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

    main()
    {
        short x1, y1, x2, y2;

        _setvideomode( _VRES16COLOR );
        _getcliprgn( &x1, &y1, &x2, &y2 );
        _setcliprgn( 130, 100, 510, 380 );
        _ellipse( _GBORDER, 120, 90, 520, 390 );
        getch();
        _setcliprgn( x1, y1, x2, y2 );
        _setvideomode( _DEFAULTMODE );
    }

Classification:
    PC Graphics

Systems:
    DOS, QNX

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