home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 344b.lha / plplot_v2.6 / src / icnvrt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-27  |  799 b   |  50 lines

  1. /* Coordinate transformations for plotting package */
  2. /* Convertion routines yielding an integer result  */
  3.  
  4. #include "plplot.h"
  5. #include "declare.h"
  6.  
  7. /* dcpc. converts device coordinates to physical coordinates */
  8.  
  9. PLINT dcpcx(x)
  10. PLFLT x;
  11. {
  12.       return(round(dpxoff + dpxscl * x));
  13. }
  14.  
  15. PLINT dcpcy(y)
  16. PLFLT y;
  17. {
  18.       return(round(dpyoff + dpyscl * y));
  19. }
  20.  
  21. /* mmpc. converts millimetres from bottom left-hand corner to physical */
  22. /* coordinates */
  23.  
  24. PLINT mmpcx(x)
  25. PLFLT x;
  26. {
  27.       return(round(mpxoff + mpxscl * x));
  28. }
  29.  
  30. PLINT mmpcy(y)
  31. PLFLT y;
  32. {
  33.       return(round(mpyoff + mpyscl * y));
  34. }
  35.  
  36. /* wcpc. converts world coordinates to physical coordinates */
  37.  
  38. PLINT wcpcx(x)
  39. PLFLT x;
  40. {
  41.       return(round(wpxoff + wpxscl * x));
  42. }
  43.  
  44. PLINT wcpcy(y)
  45. PLFLT y;
  46. {
  47.       return(round(wpyoff + wpyscl * y));
  48. }
  49.  
  50.