Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - point http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Point
 lineto()                Draw a Line From Current Pos to a Specified Point

 #include   <graphics.h>

 void far   lineto(x1,y1);
 int        x1;
 int        y1;

    lineto() draws a line from the current position (CP) to a point
    specified by ('x1','y1').  'x1' and 'y1' are relative to the current
    viewport.  The line is drawn in the current color, line style and
    thickness. After the line is drawn, the current position (CP) is
    moved to ('x1','y1').  When the graphics system is first initialized
    the current position (CP) is (0,0).

    Returns:    Nothing.

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

    The following statements use lineto() to draw a triangle.

           #include <graphics.h>
           #include <conio.h>

           int gdriver = DETECT;
           int gmode;

           main()
           {
               int x;
               int x0, y0;

               initgraph(&gdriver,&gmode,"");
               lineto(200,200);
               lineto(0,200);
               lineto(x0,y0);
               getch();
               closegraph();
           }


See Also: getcolor() getlinesettings() line() linerel()

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