Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Microsoft C 6.0 - <b>_setcliprgn() set clipping region</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _setcliprgn()           Set clipping region

 #include   <graph.h>

 void far _setcliprgn( x1, y1, x2, y2 );
  short x1, y1;     Upper-left corner of clip region
  short x2, y2;     Lower-right corner of clip region

    _setcliprgn() limits the display of images to a particular area of
    the screen, known as the "clipping region". The physical points (x1,
    y1) and (x2, y2) mark the upper-left and lower-right corners of a
    rectangle defining the clipping region.

         Notes:     _setcliprgn() has no effect on the logical coordinate
                    system, but merely masks portions of the physical
                    screen. It affects images only, not text. To mask the
                    screen for text output use _settextwindow().

   Portability:     MS-DOS only, true MDPA, CGA, EGA, MCGA, or VGA video
                    compatibles

 -------------------------------- Example ---------------------------------

    This program draws a filled ellipse that partially extends beyond the
    boundaries of a rectangular clipping region on all four sides.

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

           main()
           {
              _setvideomode( _MRES4COLOR );
              _setcliprgn( 100, 40, 260, 140 );
              _ellipse( _GFILLINTERIOR, 90, 30, 270, 150 );

              while ( !kbhit() );
              _setvideomode( _DEFAULTMODE );
           }



See Also: _setviewport() _settextwindow()

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