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

 #include   <graph.h>

 unsigned short far _getlinestyle( void );

    _getlinestyle() gets the current 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.

       Returns:     _getlinestyle() returns the current linestyle mask,
                    or the default mask if no mask has been set.

   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: _setlinestyle()

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