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>
    short _FAR _lineto( short x, short y );

    short _FAR _lineto_w( double x, double y );

Description:
    The _lineto functions draw straight lines.  The _lineto function uses
    the view coordinate system.  The _lineto_w function uses the window
    coordinate system.

    The line is drawn from the current position to the point at the
    coordinates (x,y).  The point (x,y) becomes the new current position.
     The line is drawn with the current plotting action using the current
    line style and the current color.

Returns:
    The _lineto functions return a non-zero value when the line was
    successfully drawn; otherwise, zero is returned.

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

    main()
    {
        _setvideomode( _VRES16COLOR );
        _moveto( 100, 100 );
        _lineto( 540, 100 );
        _lineto( 320, 380 );
        _lineto( 100, 100 );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

    produces the following:



Classification:
    PC Graphics

Systems:
     _lineto - DOS, QNX

    _lineto_w - DOS, QNX

See Also:
    _moveto, _setcolor, _setlinestyle, _setplotaction

See Also: _setcolor _setlinestyle

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