home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume8 / gnuplot1.10A / part01 / aed.trm < prev    next >
Encoding:
Text File  |  1989-09-09  |  1.9 KB  |  109 lines

  1. #define AED_XMAX 768
  2. #define AED_YMAX 575
  3.  
  4. #define AED_XLAST (AED_XMAX - 1)
  5. #define AED_YLAST (AED_YMAX - 1)
  6.  
  7. #define AED_VCHAR    13
  8. #define AED_HCHAR    8
  9. #define AED_VTIC    8
  10. #define AED_HTIC    7
  11.  
  12. /* slightly different for AED 512 */
  13. #define AED5_XMAX 512
  14. #define AED5_XLAST (AED5_XMAX - 1)
  15.  
  16. AED_init()
  17. {
  18.     fprintf(outfile,
  19.     "\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD");
  20. /*   2            3     4                5     7    6       1
  21.     1. Clear Screen
  22.     2. Set Encoding
  23.     3. Set Default Color
  24.     4. Set Backround Color Table Entry
  25.     5. Set Backround Color
  26.     6. Move to Bottom Lefthand Corner
  27.     7. Anti-Alias Vectors
  28. */
  29. }
  30.  
  31.  
  32. AED_graphics()
  33. {
  34.     fprintf(outfile,"\033FFD\033");
  35. }
  36.  
  37.  
  38. AED_text()
  39. {
  40.     fprintf(outfile,"\033MOV.0.9.SEC.7.XXX");
  41. }
  42.  
  43.  
  44.  
  45. AED_linetype(linetype)
  46. int linetype;
  47. {
  48. static int color[2+9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
  49. static int type[2+9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
  50.  
  51.     if (linetype >= 10)
  52.         linetype %= 10;
  53.     fprintf(outfile,"\033SLS%d.255.",type[linetype+2]);
  54.     fprintf(outfile,"\033SEC%d.",color[linetype+2]);
  55. }
  56.  
  57.  
  58.  
  59. AED_move(x,y)
  60. int x,y;
  61. {
  62.     fprintf(outfile,"\033MOV%d.%d.",x,y);
  63. }
  64.  
  65.  
  66. AED_vector(x,y)
  67. int x,y;
  68. {
  69.     fprintf(outfile,"\033DVA%d.%d.",x,y);
  70. }
  71.  
  72.  
  73. AED_lrput_text(row,str) /* write text to screen while still in graphics mode */
  74. int row;
  75. char str[];
  76. {
  77.     AED_move(AED_XMAX-((strlen(str)+2)*AED_HCHAR),AED_VTIC+AED_VCHAR*(row+1));
  78.     fprintf(outfile,"\033XXX%s\033",str);
  79. }
  80.  
  81.  
  82. AED5_lrput_text(row,str) /* same, but for AED 512 */
  83. int row;
  84. char str[];
  85. {
  86.     AED_move(AED5_XMAX-((strlen(str)+2)*AED_HCHAR),AED_VTIC+AED_VCHAR*(row+1));
  87.     fprintf(outfile,"\033XXX%s\033",str);
  88. }
  89.  
  90.  
  91. AED_ulput_text(row,str) /* write text to screen while still in graphics mode */
  92. int row;
  93. char str[];
  94. {
  95.     AED_move(AED_HTIC*2,AED_YMAX-AED_VTIC-AED_VCHAR*(row+1));
  96.     fprintf(outfile,"\033XXX%s\033",str);
  97. }
  98.  
  99.  
  100. #define hxt (AED_HTIC/2)
  101. #define hyt (AED_VTIC/2)
  102.  
  103. AED_reset()
  104. {
  105.     fprintf(outfile,"\033SCT0.1.0.0.0.SBC.0.FFD");
  106. }
  107.  
  108.  
  109.