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

  1. /* GNUPLOT -  hp2648.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.  *  HP2648 and HP2647
  21.  *
  22.  * AUTHORS
  23.  *  Russell Lang
  24.  * 
  25.  * send your comments or suggestions to (pixar!info-gnuplot@sun.com).
  26.  * 
  27.  */
  28.  
  29. #define HP2648XMAX 720             
  30. #define HP2648YMAX 360
  31.  
  32. #define HP2648XLAST (HP2648XMAX - 1)
  33. #define HP2648YLAST (HP2648YMAX - 1)
  34.  
  35. #define HP2648VCHAR        12      
  36. #define HP2648HCHAR        7        
  37. #define HP2648VTIC        8
  38. #define HP2648HTIC        8
  39.  
  40.  
  41. HP2648init()
  42. {
  43.     fprintf(outfile,"\033*m1m1n136,1cZ");
  44. /*                   1     2 3     4
  45.     1. mode
  46.     2. textsize=1
  47.     3. textangle=1
  48.         4. define line type 2 to be *   *   *   * etc.
  49. */
  50. }
  51.  
  52.  
  53. HP2648graphics()
  54. {
  55.     fprintf(outfile,"\033*dacZ");
  56. /*                   1     23
  57.     1. mode
  58.     2. clear grahics screen
  59.     3. graphics video on
  60. */
  61. }
  62.  
  63.  
  64. HP2648text()
  65. {
  66. }
  67.  
  68.  
  69. HP2648linetype(linetype)
  70. int linetype;
  71. {
  72.     static int hpline[] = {1,7,1,4,5,6,8,9,10,7,2};
  73.     fprintf(outfile,"\033*m%dbZ",hpline[(linetype+2)%11]);
  74. }
  75.  
  76.  
  77. HP2648move(x,y)
  78. int x,y;
  79. {
  80.     fprintf(outfile,"\033*paf%d,%dZ",x,y);
  81.     /*               1     23     4
  82.     1    plot mode
  83.     2    "pen up"
  84.     3    goto absolute x,y
  85.     4    end command
  86.     */
  87. }
  88.  
  89.  
  90. HP2648vector(x,y)
  91. int x,y;
  92. {
  93.     fprintf(outfile,"\033*pbf%d,%dZ",x,y);
  94.     /*                     1 
  95.     1    "pen down"
  96.     */
  97. }
  98.  
  99.  
  100. HP2648put_text(x,y,str)
  101. int x, y;
  102. char *str;
  103. {
  104.     HP2648move(x,y-HP2648VCHAR/2 + 1);
  105.     fprintf(outfile,"\033*l%s\n",str);
  106. }
  107.  
  108.  
  109. int HP2648_text_angle(ang)
  110. int ang;
  111. {
  112.     fprintf(outfile,"\033*m%dnZ\n",ang+1);
  113.     return TRUE;
  114. }
  115.     
  116. HP2648reset()
  117. {
  118. }
  119.  
  120.