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

 #include   <graph.h>

 void far _setlinestyle( mask );
  unsigned short mask;   New line style mask

    _setlinestyle() defines the mask used for line drawing by functions
    _lineto() and _rectangle(). The mask is a 16-bit array, where each
    bit represents a pixel in the line being drawn. A 1 bit sets the
    corresponding pixel to the current color, while a 0 bit leaves the
    pixel unchanged. The default mask is 0xFFFF, which causes a solid
    line of the current color.

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

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

    This program draws a rectangle using a dashed line.

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

           unsigned short mask = 0x0F0F;
           unsigned short oldmask;

           main()
           {
              _setvideomode( _MRES4COLOR );
              oldmask = _getlinestyle();
              _setlinestyle( mask );
              _rectangle( _GBORDER, 60, 20, 240, 120 );

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


See Also: _getlinestyle()

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