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 - _setfillmask() set fill mask http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _setfillmask()     Set fill mask

 #include   <graph.h>

 void far _setfillmask( mask );
  unsigned char far *mask;    Mask array

    _setfillmask() sets the current fill mask, which establishes the
    pattern output by _floodfill(), _pie(), _ellipse(), and _rectangle().
    The mask is an 8 by 8 array of bits, where each bit represents a
    pixel. A 1 bit sets the corresponding pixel to the current color,
    while a 0 bit leaves the pixel unchanged. The default mask is NULL,
    which causes a solid fill of the current color.

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

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

    This program draws an ellipse and fills the background with a masked
    pattern.

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

           unsigned char mask[] = { 0x00, 0x00, 0xFF, 0xFF,
                                    0x00, 0x00, 0xFF, 0xFF };
           unsigned char oldmask[] = {  0x00, 0x00, 0x00, 0x00,
                                        0x00, 0x00, 0x00, 0x00 };

           main()
           {
              short color;
              int i;

              _setvideomode( _MRES4COLOR );
              color = _getcolor();

              _getfillmask( oldmask );
              _setfillmask( (char far *) mask );

              _ellipse( _GBORDER, 90, 60, 250, 160 );

              _floodfill( 60, 30, color );

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


See Also: _floodfill() _getfillmask() _ellipse()

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