fche@db.toronto.edu (Frank Eigler) (04/10/89)
Hi all, Does anyone know of a (working) postscript emulator for Smalltalk? Such things exist for X11 and other things, but having one written in Smalltalk would be very useful to a project we are working on. Thanks for any information. -- ................................................................. Frank Ch. Eigler |The Hack BBS _ (416)-265-3984 // fche@db.toronto.edu | /\ /\/\ / / \ /\ // fche%db.toronto.edu@relay.cs.net| /__X X / _ /__\ \\ // {uunet,watmath}!utai!db!fche |/ / \ / \\__// \ \X/
trevor@ux.cs.man.ac.uk (Trevor Hopkins) (04/11/89)
In article <89Apr10.105518edt.9310@ois.db.toronto.edu> fche@db.toronto.edu writes: > > Does anyone know of a (working) postscript emulator for > Smalltalk? Such things exist for X11 and other things, > but having one written in Smalltalk would be very useful > to a project we are working on. I felt this reply might be of more general interest, so I've followed-up to the net. A final year undergraduate student called Greg Ngan wrote a Postscript interpreter in Smalltalk-80 for his final year project (1988). This allowed Postscript code to be selected and executed in one subview, with the resulting output being displayed in another subview. Postscript code could also be executed from selected files. The structure basically consisted of a stack-based interpreter (classes for this, of course), plus some classes which supported the `painting' structure expected by Postscript, plus some View and Controller classes. The interpreter basically worked, but Greg did not have time to implement all the postscript primitives, so it must be regarded as a subset implementation only. Strokes and fills worked well (at least within the limitations of the screen display), and it could produce quite a reasonable rendering of (say) the `Mac Golfer' image. It was very weak at text, as (for simplicity) it used the Smalltalk fonts, and scaled then as necessary. Only some kinds of bitmaps were displayable. It was also fairly slow, even using PS2.2 on a Sun 3/60. Being a undergraduate project performed by someone with no previous Smalltalk experience, the quality of the design (class hierarchies, etc.) and implementation techniques leave something to be desired (read: awful Smalltalk style), so this work has not yet appeared as a `goodie'. At one time, I had intended to do some `cleaning-up' work on it, and make it more generally available, but I've not got around to this just yet. My feeling is that a good Smalltalk programmer who also understood Postscript could do a good job of building a Postscript interpreter in Smalltalk. I'd tend to regard Greg's work as an experiment, and start again from scratch, however. (This is called `prototype software development :-) If anyone wants a copy og Greg's report, send me a postal address. I don't really want to release the code (it really is *disgusting* :-). Trevor. ------------------------------------------------------------------ Trevor P. Hopkins, Room 2.95, Department of Computer Science, University of Manchester, Oxford Road, Manchester, M13 9PL, U.K. Tel: (+44) 61-275 6170 Internal: 6170 JANET: trevor@uk.ac.man.cs.ux UUCP: ..ukc!man.cs.ux!trevor ------------------------------------------------------------------