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 ) - <b>moverel() move current position (cp) a relative distance</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 moverel()               Move Current Position (CP) a Relative Distance

 #include   <graphics.h>

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

    moverel() moves the current position (CP) to a new position relative
    to it. The position is moved 'x1' pixels in the x direction and 'y1'
    pixels in the y position.

    Returns:    Nothing.

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

    The following statements draw a triangle after moving the current
    position (CP) from initial coordinates (0,0).


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

           main()
           {
               int gdriver = DETECT;
               int gmode;

               initgraph(&gdriver,&gmode,"");
               moverel(300,200);
               linerel(100,100);
               linerel(-100,0);
               linerel(0,-100);
               getch();
               closegraph();
           }


See Also: moveto()

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