> On my outdated laptop, I use GS to create bit-map files, and a very basic
> anti-aliasing zooming PBM-viewer to display them (which I wrote). This is
> based on SVGALIB, so it should work under emulation with GGI (?right?).
Probably. If it doesn't do anything nasty, the wrapper should work.
> The other thing about GhostScript is that it does some special things when
> directed to write to a window under X that it doesn't normally do for other
> drivers, like anti-aliasing.
Hmm - I'd assume it will do the same on targets that can accomodate the
output. pgm should suffice.
> A GGI-based GV-replacement will be on my wish-list too,
I have just thought about this a bit, and here is what I came up with:
1. Writing a GGI driver for ghostscript isn't quite trivial, as we should
add a little "feedback" like allowing the "return for next page" to come
from the GGI visual instead of some maybe backgrounded terminal the
thing was started from. If someone knows how to do this, he's very welcome.
2. Writing a GGI application that _drives_ a standard ghostscript and
displays the results should be pretty much _trivial_ depending on how much
extra functionality you want to have.
I have looked at the output that is produced, if you output -sDEVICE=pgmraw
to a pipe: It is a simple concatenation of pgms.
Now if we write a very simple application that will run ghostscript in a
pipe, feeding it with the files the app got in its command line arguments
and catching the output and rendering it into a memory-visual, we are almost
All we need then is a bit of input stuff that will allow to scroll around in
the result and allow to change ghostscript parameters for rerunning
ghostscript (e.g. for zooming). If we want color, we just render to ppmraw.
The loader code is pretty generic, and I have code for loading p?m files,
if someone needs it.
I'd say the functions:
change-zoom-factor (+/-/explicit set)
should be trivial and usually almost all that is needed.
It might be nice, if we could "post-zoom" (operating on the already obtained
picture) to allow to simply render at high resolution and still quickly get
overview pages without rerunning ghostscript.
Other stuff like manifying glasses, going backwards etc. would be a bit
trickier, though there are simple but slow solutions using ghostscript.
I suppose that gv solves these problems by making use of the document
structure stuff, as it only works on those files ... so ...
Anyone here to take that programming challenge ?
As said, it's pretty trivial. I'd expect it to be well below 1000 lines of
code, I'd estimate 200 or 300 for a first version that works nicely,
without the really tricky stuff.
If noone does, I will eventually do it, as I'd definitely like to view ps
right from the commandline ... (and other stuff that can be filtered to ps,
like pdf, dvi etc.)
= Andreas Beck | Email : <[EMAIL PROTECTED]> =