home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / atari / st / 13293 < prev    next >
Encoding:
Internet Message Format  |  1992-09-07  |  2.2 KB

  1. Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
  2. From: warwick@cs.uq.oz.au (Warwick Allison)
  3. Newsgroups: comp.sys.atari.st
  4. Subject: PageStream:  Easy program-generated vector graphics!
  5. Keywords: vector dtp
  6. Message-ID: <10173@uqcspe.cs.uq.oz.au>
  7. Date: 5 Sep 92 22:45:52 GMT
  8. Sender: news@cs.uq.oz.au
  9. Reply-To: warwick@cs.uq.oz.au
  10. Lines: 78
  11.  
  12. By using the "Adobe Illustrator" import driver, you can easily make
  13. your own programs to create vector graphics with simple ASCII files.
  14.  
  15. Put these 4 lines of ASCII text at the beginning of your vector
  16. graphics file:
  17.  
  18. %!PS-Adobe
  19. %%Creator: Adobe Illustrator
  20. %%BoundingBox: 0 0 100 100
  21. %%EndSetup
  22.  
  23. (yes, it looks like PostScript, but PageStream can also import it
  24.  as normal line graphics for those of us without PostScript printers)
  25.  
  26. Then to set the line width to say 0.5pt,  add this line
  27.  
  28. 0.5 w
  29.  
  30. Then to use black lines, add this line (1=white):
  31.  
  32. 0 G
  33.  
  34. Then to set the line ends to squares, add these 2 lines (1=rounded):
  35.  
  36. 0 j
  37. 0 J
  38.  
  39.  
  40. Now, to move to a point say (100.5,300.0) (in pt), use:
  41.  
  42. 100.5 300 m
  43.  
  44. And to draw a line from the last move or line point to (20,50), use:
  45.  
  46. 20 50 l
  47.  
  48.  
  49. At the end of each polyline (a sequence of moves and lines), add:
  50.  
  51. S
  52.  
  53.  
  54. Then add this line to the end:
  55.  
  56. %%Trailer
  57.  
  58.  
  59.  
  60. Simple!  The caveats are:
  61.  
  62.     1) You'll have to set the line width and colour, because the
  63.         defaults are 0pt and white.
  64.  
  65.     2) You MUST end shapes with "S", otherwise they will not show up.
  66.  
  67.     3) PageStream has a limit to the number of points in a shape, so
  68.         make sure you divide your vector graphics up into
  69.         sufficient shapes.
  70.  
  71. and, I'm not sure, but probably:
  72.  
  73.     4) Line widths/ends don't work mid-way through drawing a shape.
  74.  
  75.  
  76. I have trivial C++ code for this, if anyone cannot follow.  And a cool
  77. Fractal Tree drawer - which is my reason for finding this out :-)
  78.  
  79. I simply used a slightly modified version of the format generated by
  80. GNUplot's AIFM driver... if you fix that driver, you could easily use
  81. GNUplot to generate graphs, etc for inclusion into PageStream!
  82.  
  83. --
  84. Warwick
  85. --
  86.   _-_|\      warwick@cs.uq.oz.au            /Disclaimer:
  87.  /     * <-- Computer Science Department,  /  
  88.  \_.-._/     University of Queensland,    /      void (if removed)
  89.       v      Brisbane, Australia.        /  
  90.