discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using gslib in the backend


From: BALATON Zoltan
Subject: Using gslib in the backend
Date: Sun, 31 Mar 2002 21:17:18 +0200 (MEST)

Hello,

Thanks to Adam's backend split it became much easier to hack gslib into
the backend. I had a little time and started to implement something which
does not work yet but is just a proof-of-concept. By now I managed to
build ghostscript as a library, link it into the backend and have it draw
some gray blobs in a window (which is not even the right window yet). So
it is nothing useable but it's a start.

It seems that we get most of the postscript operators for free by using
gslib (and they are also implemented right). Though there are a few cases
where gslib provides lower level or slightly different functionality.
These are tipically the more complex operators such as image and font
handling and the show operators (see gs/doc/Lib.htm for details). As I
don't yet understand these parts I can't display text and the font
handling is just substituted from the xlib backend which is wrong. This
needs some more thought and studying the ghostscript sources.

Another thing to solve is the driver to use. Ghostscript has drivers to a
lot of devices and currently I've just picked a driver for testing which
implements alpha and draws to an X window, but it creates a window itself
so everything drawn by gslib now goes to this window and not that of the
application. Maybe the driver can be told to use an existing window
instead (ghostview does this) or we could use a driver which renders to
memory using the Xshm extension (though we would lose remote display
capability then). Fortunately the driver interface is more or less
documented so it is also possible to write new drivers.

Although because of the above problems this is still far from a useable
backend I would like to release it now to see if there is interest for
it and also because I don't know how much spare time I will have to
continue working on this. Let me know what do you think.

The patch (against cvs of 2002 Mar 29 20:15) can be found at:
http://goliat.eik.bme.hu/~balaton/gnustep/gnustep-back-gslib.patch.gz

You also have to set GHOSTSCRIPTDIR by hand in config.make. This directory
should contain a ghostscript source tree and the gslib library. I used
GNU Ghostscript 6.52 and the makefile at
http://goliat.eik.bme.hu/~balaton/gnustep/makefile
to build it as a library archive. (Put the makefile in the root where
doc,lib,src are and type 'make STDDIRS; make libgslib.a'.)

Greetings,
BALATON Zoltan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]