Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    void _FAR _setlinestyle( unsigned short style );

Description:
    The _setlinestyle function sets the current line-style mask to the value
    of the style argument.

    The line-style mask determines the style by which lines and arcs are
    drawn.  The mask is treated as an array of 16 bits.  As a line is drawn,
    a pixel at a time, the bits in this array are cyclically tested.  When a
    bit in the array is 1, the pixel value for the current point is set
    using the current color according to the current plotting action;
    otherwise, the pixel value for the point is left unchanged.  A solid
    line would result from a value of 0xFFFF and a dashed line would result
    from a value of 0xF0F0

    The default line style mask is 0xFFFF

Returns:
    The _setlinestyle function does not return a value.

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

    #define DASHED 0xf0f0

    main()
    {
        unsigned old_style;

        _setvideomode( _VRES16COLOR );
        old_style = _getlinestyle();
        _setlinestyle( DASHED );
        _rectangle( _GBORDER, 100, 100, 540, 380 );
        _setlinestyle( old_style );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

    produces the following:



Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _getlinestyle, _lineto, _rectangle, _polygon, _setplotaction

See Also: _getlinestyle _setplotaction

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