home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 260.lha / PLT_v1.2 / README < prev    next >
Encoding:
Text File  |  1989-07-07  |  10.3 KB  |  270 lines

  1.                            PLT:
  2.                        Version 1.2
  3.                        July 5, 1989
  4.  
  5.                         Jim Miller
  6.                       Rich Champeaux
  7.  
  8.  
  9.  
  10. This archive includes a file-handler (plt-handler), a 
  11. portion of mountlist, a program for setting an environment variable for
  12. the handler (SetPltInfo), and a example plot file (amiga.clr).
  13.  
  14. PLT: is a file-handler that accepts HP-GL commands, produces a 
  15. raster image, then dumps it to your printer.  The handler
  16. inquires from Preferences your printer's current resolution in order 
  17. to maximize your plot quality.  There is also an ability to preview
  18. a plot in order to see what it will look like on paper before
  19. you waste the time printing it.  When previewing a plot, a separate
  20. screen appears that illustrates your plot's layout relative to the 
  21. size of the paper.
  22.  
  23.  
  24. The basic HP-GL commands are implemented, but none of the 
  25. advanced commands that are usually held in an external ROM cartridge.
  26.  
  27.  
  28. Feel free to copy, use and distribute this handler as you wish, 
  29. as long as this handler remains in the public domain.  
  30. No financial profit should be obtained by distributing this handler
  31. without the consent of Richard Champeaux or James Miller.  Please respond 
  32. with any problems, comments, or instructions.  
  33.  
  34.  
  35.  
  36. The handler is uuencoded.  It must be uudecoded and placed
  37. in your L: directory.  A portion of a mountlist in included
  38. and must be inserted into your mountlist. (Alterations to the 
  39. startup-string will be necessary if you want different colors
  40. or pen thicknesses.)
  41.  
  42.  
  43. ____________________________________________________________________
  44.  
  45. MOUNTLIST PORTION
  46.  
  47. plt:       Handler   = l:plt-handler
  48.            Startup   = SW/000-1/f00-2/0f0-2/00f/ff0-1
  49.            Stacksize = 5000
  50.            Priority  = 5
  51.            GlobVec   = 1
  52. #
  53.  
  54.  
  55. ____________________________________________________________________
  56.  
  57. OPERATION
  58.  
  59. PLT: can be used in a variety of manners. 
  60.  
  61. 1.      You can copy files containing HP-GL commands to the handler.
  62.         ex.  copy <filename> PLT:
  63.         
  64. 2.      You can direct a CAD package to plot to a file and give the 
  65.         filaname as "PLT:"
  66.         
  67. 3.      You can redirect output from a CAD package heading towards
  68.         the serial port to the handler.
  69.         ex.  cmd serial.device PLT:
  70.         
  71. 4.      You can write your own applications that write directly to the
  72.         handler (PLT:).
  73. ____________________________________________________________________
  74.  
  75. MEMORY
  76.  
  77. PLT: does take up quite a bit of memory.  Not as much as a full raster image,
  78. but still quite alot.
  79.  
  80. PLT: code needs      35K
  81. printer.device needs 35K
  82. raster varies from    5K - 14K
  83. each lines takes     28 bytes  (or 16 in the Memory Conserve mode)
  84.  
  85.  
  86. Before data is read, PLT: removes 90K from your system.
  87.  
  88. An average plot will usually require an additional 30-50k.
  89. A complex plot will usually require about 180K or more.
  90.  
  91. ______________________________________________________________________
  92.  
  93. COLORS and LINE THICKNESSES
  94.  
  95. Pen plotters usually have a variety of pens that can be different colors
  96. or thicknesses.  PLT: emulates this by allowing you to set the number
  97. of pens you wish to emulate, their respective colors, and their respective 
  98. thicknesses.  By default, PLT: assumes you want one black pen of thickness
  99. one.  If you wish to redefine this default, you can use a "Startup String" 
  100. similar to one displayed in the above mountlist.
  101.  
  102. The startup string allows you to customize PLT: by instructing it whether
  103. it should plot to the screen or to the printer, whether to display a 
  104. status window when dumping to the printer, and by setting the colors
  105. and thicknesses of the pens you wish to emulate.  The format is:
  106.  
  107.         SWITCHES/RGB-t/RGB-t/RGB-t/...
  108.         
  109.         where:
  110.             SWITCHES could be:      S  Plot to screen
  111.                                     W  Display status window (default)
  112.                                     M  Memory Conserve mode
  113.                (A '-' can be prefixed to the switches to negate them)
  114.                
  115.             PENS are decribed as:   RGB-t  
  116.                 where:
  117.                                     RGB is the pen color (in hex)
  118.                                     t is the pen thickness (optional,
  119.                                         defaults to 1)
  120.                                         
  121. Ex.
  122.  
  123.         Startup = S/000-1/f00-3/0c3-2
  124.         Startup = SW/0f0/000/0f0-2
  125.         Startup = ff0-2/05f
  126.  
  127. The StartUp field of the mountlist appears to be limited to only 39
  128. characters.  This is enough for a couple of switches and about 5 pens.
  129. If more pens are needed, use the method discussed below.
  130.         
  131. (NOTE: Due to an programming error, v1.0 negated all switches that occured
  132.        after a '-'.  I guess it was a valid way to do it, but it wasn't
  133.        what I intended, and it's not the way this version works.  As an
  134.        example, to negate both the S and W switches, you must use '-S-W'.
  135.        The only switch that might need to be negated in the default string 
  136.        is 'W'. The other switches default off.  The '-' is there mainly for 
  137.        switches passed when PLT: is called so that the switches defined in 
  138.        the default strings can be turned off. )
  139.         
  140.  
  141. Another way to redefine the defaults of PLT: is to specify a string similar 
  142. to the startup string by using environment variables.  This may be performed 
  143. by setting the AmigaDOS enviroment variable "PltInfo" with the SetEnv command.
  144. The format for this string is identical to the startup string in the mountlist.  
  145. If the enviroment variable is found, the string in the mountlist is ignored.
  146.  
  147.  
  148. Ex.
  149.  
  150.         setenv pltinfo S/000-1/f00-3/0c3-2
  151.         
  152.         
  153. This is useful if you want to alter the way the next several plots look,
  154. without having to alter your mountlist and rebooting your computer.
  155.  
  156.  
  157. If you want to override the defaults for the current plot, you can add
  158. a startup string to the invocation of the handler.  For instance, if
  159. you have a file of HP-GL commands that you want plotted; you could 
  160. normally type:
  161.  
  162.         copy <filename> PLT:
  163.         
  164. If for this particular plot, you wanted all the parameters identical
  165. to your previously defined defaults (from environment variables, mountlist
  166. string, or handler defaults) except you wanted it to plot to the screen;
  167. then you could type:
  168.  
  169.         copy <filename> PLT:S
  170.         
  171.         
  172. If you wanted it to plot to the screen using only one pen, you could 
  173. type:
  174.  
  175.         copy <filename> PLT:S/000
  176.         
  177. With these three methods of altering how your plot will look, you have the
  178. greatest flexibility for customizing your plots on the fly.
  179.  
  180. The string passed through the invocation of the handler only affects
  181. the parameters defined.  If you add the switch to plot to the screen,
  182. it will no affect the pen colors.  To negate one of the switches set
  183. as a default, prefix a '-' to it.  Ex. -W.
  184.  
  185.  
  186. PLT: decides how many bitplanes to use by the number of different colors
  187. you request, not the number of pens.  This allows you to have many pens
  188. of the same color but of different thicknesses with out requiring extra
  189. bit planes.
  190.  
  191. The usable colors are dependent upon the number of colors that your printer
  192. can display in a single pixel.  For example, the Okidata ML-292 can display
  193. only 14 colors in a single pixel.  If a color is used that the printer can't
  194. support, the driver will try to dither.  This causes oddities such as lines
  195. with alternating yellow and green dots.  (Who knows?  This may actually be
  196. desired.)  Also, the RGB colors may not always match up to printer colors
  197. like you might expect.  For instance, 00f prints as violet on the Okidata
  198. ML-292, and 0ff prints as cyan, which is the blue I expected 00f to print
  199. as.  It might take a bit of playing with the RGB values to get the colors
  200. you desire.
  201.  
  202. MEMORY CONSERVE MODE
  203.  
  204. This mode reduces the amount of memory required for each plot, allowing
  205. more complex plots to be printed.
  206.  
  207. PLT: builds a sorted list of the lines to be plotted, and then prints the
  208. page in strips.  In it's normal mode, PLT: requires 28 bytes per line,
  209. however, in the Memory Conserve mode, only 16 bytes are required per
  210. line.  This allows you to plot almost twice as many lines, but causes
  211. a serious performance degradation.  The normal mode implements a linked
  212. list with a binary tree on top of it for insertion.  The Memory Conserve
  213. mode does not use the binary tree, and must do a linear search of the list
  214. to insert a new line.  The performance degradation becomes most noticable
  215. when the plot has more than 2000 lines.  As an example, a 9800 line plot 
  216. that I have takes 2 minutes and 10 seconds to process the input using the 
  217. normal mode, but takes 8 minutes and 7 seconds using the Memory Conserve
  218. mode.
  219.  
  220.  
  221. STATUS WINDOW
  222.  
  223. When the 'W' switch is set, PLT: displays a status window.  As well as 
  224. displaying the status of the plot, this window has a close box that can
  225. be used to abort the plot.  It also displays the number of lines processed
  226. and the amount of free memory.
  227.  
  228.  
  229. ESTIMATING MEMORY USAGE
  230.  
  231. When the output is sent to the screen, the number of lines processed is
  232. displayed in the title bar.  Since sending the plot to the screen is 
  233. considerably faster than sending it to the printer, you can estimate the
  234. amount of memory needed by multiplying the number of lines by either
  235. 16 or 28 and adding 80-100k.  When the output is sent to the screen, the
  236. line list is not built, and thus takes much less memory.
  237.  
  238.  
  239. AF AND PG COMMANDS
  240.  
  241. The AF and PG commands are now implemented.  These commands cause the page
  242. to be dumped, and a new one started.  If the output is sent to the screen,
  243. the close box must be clicked to display the next page.
  244.  
  245. __________________________________________________________________________
  246.  
  247. FUTURE PLANS
  248.  
  249. 1.   There are some more HP-GL commands that I wish to implement but 
  250.      are not currently implemented, because they are seldom used by 
  251.      CAD packages.
  252.  
  253. 2.   Making the previewer more powerful, by letting you alter the shape
  254.      of the plot, laying two plot files on the same page, or adding
  255.      borders and additional text.
  256.      
  257. 3.   Implementing another font and symbol set.
  258.  
  259. 4.   Optimizing the code to make the handler process information faster.
  260.  
  261. 5.   Preparing a document describing the purpose, operation and features
  262.      of PLT:
  263.  
  264. __________________________________________________________________________
  265.  
  266. My e-mail address is:
  267.  
  268.         jvmiller@rdrc.rpi.edu
  269.         
  270. if you have any questions, comments, or requests.