Re: [Gnome-print] Re: PS Obsession????



Hello !

On Wed, Jun 07, 2000 at 10:33:39PM +0200, Lauris Kaplinski wrote:
[clip]
> What probably is needed, is new and improved, forth extesible imaging
> API, so traditional PS can be implemented as plugin library.

As you may remember from my controversial 'RFC' document, I am very
inclined towards having a forth-like language as a possible metadata
format.

As Miguel pointed out that GhostScript code is spaghetti-land, and was
not something he wanted to deal with, I was toying with the idea of
writing a forth-like interpreter.

As I read your comment, I think you should have a look at the following
code, which implements a simplistic (and extremely experimental)
interpreter :

http://users.swing.be/diederen/tarballs/picasso-0.0.3.tar.gz

While it may not be a suitable base to build a complete GhostScript-like
solution, I have tried to keep the following goals during the (short)
design phase :

* Embeddable. The interpreter should be usable as a library, and the state
	should be kept in data structures (it should be possible to
	have multiple interpreters running simultaneously).

* Extensible. The interpreter should not assume anything about the 
	operators/functions implemented, except that their use is
	stack-based ;). Even the base functionality could reside in
	a plugin.

* Clean. Written with the help of GLib, the core should only feature clean,
	Gtk+-style, OO-like code. The messy code can go in the plugins.

If anything were to come out of this experiment, it would be cool to 
implement the following functionnality :

* A superset of PostScript as a plugin for the interpreter. This could
	include Alpha, Antialiasing, and whatever you want. This plugin
	should use the Libart API for the rasterizing process, and could
	reside on the print server. If the Picasso language were
	PostScript-compatible enough, it would even be possible to use
	it to print PostScript output from legacy programs with
	the gnome-print raster drivers (!). 

* A Gnome-print driver for Picasso, which could be based on the existing
	PostScript driver, with the hackish Alpha/etc. replaced by
	native Picasso operators.

* A Canvas print driver for Picasso, which would enable a GGV-like 
	program with Antialiasing, Alpha and real-time zooming.

* PS-Compatible PPD files for inkjet printers.

I was also thinking about a pure binary string format for Picasso, with 
the same semantics (filtering, etc.) than base-85 PS strings. This
would solve the main problem with huge images in PS streams. Something
like this could do the job : 

<[KEYWORD[binary, possibly compressed (filtered) data]KEYWORD]>

It would also help to implement a UTF-8 based 'show' operator.

Please let me know what you think about this.

> Lauris

Cu,
Damien.

-- 
Don't use the ASF video format : http://www.advogato.com/article/101.html
-- 
Damien Diederen
dash@linuxbe.org
http://users.swing.be/diederen/




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