home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
- From: warwick@cs.uq.oz.au (Warwick Allison)
- Newsgroups: comp.sys.atari.st
- Subject: PageStream: Easy program-generated vector graphics!
- Keywords: vector dtp
- Message-ID: <10173@uqcspe.cs.uq.oz.au>
- Date: 5 Sep 92 22:45:52 GMT
- Sender: news@cs.uq.oz.au
- Reply-To: warwick@cs.uq.oz.au
- Lines: 78
-
- By using the "Adobe Illustrator" import driver, you can easily make
- your own programs to create vector graphics with simple ASCII files.
-
- Put these 4 lines of ASCII text at the beginning of your vector
- graphics file:
-
- %!PS-Adobe
- %%Creator: Adobe Illustrator
- %%BoundingBox: 0 0 100 100
- %%EndSetup
-
- (yes, it looks like PostScript, but PageStream can also import it
- as normal line graphics for those of us without PostScript printers)
-
- Then to set the line width to say 0.5pt, add this line
-
- 0.5 w
-
- Then to use black lines, add this line (1=white):
-
- 0 G
-
- Then to set the line ends to squares, add these 2 lines (1=rounded):
-
- 0 j
- 0 J
-
-
- Now, to move to a point say (100.5,300.0) (in pt), use:
-
- 100.5 300 m
-
- And to draw a line from the last move or line point to (20,50), use:
-
- 20 50 l
-
-
- At the end of each polyline (a sequence of moves and lines), add:
-
- S
-
-
- Then add this line to the end:
-
- %%Trailer
-
-
-
- Simple! The caveats are:
-
- 1) You'll have to set the line width and colour, because the
- defaults are 0pt and white.
-
- 2) You MUST end shapes with "S", otherwise they will not show up.
-
- 3) PageStream has a limit to the number of points in a shape, so
- make sure you divide your vector graphics up into
- sufficient shapes.
-
- and, I'm not sure, but probably:
-
- 4) Line widths/ends don't work mid-way through drawing a shape.
-
-
- I have trivial C++ code for this, if anyone cannot follow. And a cool
- Fractal Tree drawer - which is my reason for finding this out :-)
-
- I simply used a slightly modified version of the format generated by
- GNUplot's AIFM driver... if you fix that driver, you could easily use
- GNUplot to generate graphs, etc for inclusion into PageStream!
-
- --
- Warwick
- --
- _-_|\ warwick@cs.uq.oz.au /Disclaimer:
- / * <-- Computer Science Department, /
- \_.-._/ University of Queensland, / void (if removed)
- v Brisbane, Australia. /
-