home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / GRRMOVE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  1019 b   |  42 lines

  1. /**
  2. *
  3. * Name        grrmove -- Relative move
  4. *
  5. * Synopsis    npts = grrmove(deltax,deltay,color);
  6. *
  7. *        int npts      Number of points plotted
  8. *        int deltax      Increment on the X (horizontal) axis
  9. *        int deltay      Increment on the Y (vertical) axix
  10. *        int color      Color of the line
  11. *
  12. * Description    This function draws a line using the specified color
  13. *        from the home position to the position whose offset from
  14. *        the home position is given by (deltax,deltay).    The line
  15. *        is drawn on the current display page.  The home position
  16. *        is set to the last point plotted.
  17. *
  18. * Returns    npts          The number of points plotted to draw
  19. *                  the line
  20. *
  21. * Version    3.0 (C)Copyright Blaise Computing Inc.    1983, 1986
  22. *
  23. **/
  24.  
  25. #include <bgraph.h>
  26.  
  27. int grrmove(deltax,deltay,color)
  28. int deltax,deltay,color;
  29. {
  30.     PT    epos;
  31.     int npts;
  32.  
  33.     epos.x = b_home.x + deltax;
  34.     epos.y = b_home.y + deltay;
  35.  
  36.     npts   = grline(&b_home,&epos,color);
  37.     b_home.x = epos.x;
  38.     b_home.y = epos.y;
  39.  
  40.     return(npts);
  41. }
  42.