home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 334_01 / aed.trm < prev    next >
Text File  |  1991-02-05  |  2KB  |  118 lines

  1. /* GNUPLOT - aed.trm */
  2. /*
  3.  * Copyright (C) 1990
  4.  *
  5.  * Permission to use, copy, and distribute this software and its
  6.  * documentation for any purpose with or without fee is hereby granted, 
  7.  * provided that the above copyright notice appear in all copies and 
  8.  * that both that copyright notice and this permission notice appear 
  9.  * in supporting documentation.
  10.  *
  11.  * Permission to modify the software is granted, but not the right to
  12.  * distribute the modified code.  Modifications are to be distributed 
  13.  * as patches to released version.
  14.  *  
  15.  * This software  is provided "as is" without express or implied warranty.
  16.  * 
  17.  * This file is included by ../term.c.
  18.  *
  19.  * This terminal driver supports:
  20.  *   AED terminals
  21.  *
  22.  * AUTHORS
  23.  *     Colin Kelley, Thomas Williams, Russell Lang
  24.  *
  25.  * send your comments or suggestions to (pixar!info-gnuplot@sun.com).
  26.  * 
  27.  */
  28.  
  29. #define AED_XMAX 768
  30. #define AED_YMAX 575
  31.  
  32. #define AED_XLAST (AED_XMAX - 1)
  33. #define AED_YLAST (AED_YMAX - 1)
  34.  
  35. #define AED_VCHAR    13
  36. #define AED_HCHAR    8
  37. #define AED_VTIC    8
  38. #define AED_HTIC    7
  39.  
  40. /* slightly different for AED 512 */
  41. #define AED5_XMAX 512
  42. #define AED5_XLAST (AED5_XMAX - 1)
  43.  
  44. AED_init()
  45. {
  46.     fprintf(outfile,
  47.     "\033SEN3DDDN.SEC.7.SCT.0.1.80.80.90.SBC.0.AAV2.MOV.0.9.CHR.0.FFD");
  48. /*   2            3     4                5     7    6       1
  49.     1. Clear Screen
  50.     2. Set Encoding
  51.     3. Set Default Color
  52.     4. Set Backround Color Table Entry
  53.     5. Set Backround Color
  54.     6. Move to Bottom Lefthand Corner
  55.     7. Anti-Alias Vectors
  56. */
  57. }
  58.  
  59.  
  60. AED_graphics()
  61. {
  62.     fprintf(outfile,"\033FFD\033");
  63. }
  64.  
  65.  
  66. AED_text()
  67. {
  68.     fprintf(outfile,"\033MOV.0.9.SEC.7.XXX");
  69. }
  70.  
  71.  
  72.  
  73. AED_linetype(linetype)
  74. int linetype;
  75. {
  76. static int color[2+9] = { 7, 1, 6, 2, 3, 5, 1, 6, 2, 3, 5 };
  77. static int type[2+9] = { 85, 85, 255, 255, 255, 255, 255, 85, 85, 85, 85 };
  78.  
  79.     if (linetype >= 10)
  80.         linetype %= 10;
  81.     fprintf(outfile,"\033SLS%d.255.",type[linetype+2]);
  82.     fprintf(outfile,"\033SEC%d.",color[linetype+2]);
  83. }
  84.  
  85.  
  86.  
  87. AED_move(x,y)
  88. int x,y;
  89. {
  90.     fprintf(outfile,"\033MOV%d.%d.",x,y);
  91. }
  92.  
  93.  
  94. AED_vector(x,y)
  95. int x,y;
  96. {
  97.     fprintf(outfile,"\033DVA%d.%d.",x,y);
  98. }
  99.  
  100.  
  101. AED_put_text(x,y,str)
  102. int x,y;
  103. char str[];
  104. {
  105.     AED_move(x,y - AED_VCHAR/2 + 2);
  106.     fprintf(outfile,"\033XXX%s\033",str);
  107. }
  108.  
  109.  
  110. #define hxt (AED_HTIC/2)
  111. #define hyt (AED_VTIC/2)
  112.  
  113. AED_reset()
  114. {
  115.     fprintf(outfile,"\033SCT0.1.0.0.0.SBC.0.FFD");
  116. }
  117.  
  118.