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>_getfillmask() get current fill mask</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _getfillmask()          Get current fill mask

 #include   <graph.h>

 unsigned char far * far _getfillmask( mask );
  unsigned char far *mask;    Mask array

    _getfillmask() gets 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.

       Returns:     _getfillmask() returns the value of the current mask.
                    If no mask is available, it returns NULL.

   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 = { "x00x00xFFxFFx00x00xFFxFF" };
           unsigned char *oldmask = { "x00x00x00x00x00x00x00x00" };

           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() _setfillmask()

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