[forum] Xr/Xc and SVG status (was: XFree86 5.0 TODO)

Carl Worth forum@XFree86.Org
Thu, 20 Mar 2003 11:07:48 -0500


On Thu, 20 Mar 2003 Ruth Ivimey-Cook wrote:
 > On Thu, 20 Mar 2003 Alan Hourihane wrote:
 >
 >> 9. Xc/Xr - A postscript rendering library for the RENDER extension 
 >> replacing Xlib drawing routines.
 >
 > What status is this?

I've been actively developing the Xr/Xc code. There hasn't been a
decent forum at xfree86.org for discussing it since the inexplicable
termination of the render@xfree86.org list (I truly miss the high SNR
of that list).

The status is that the libraries do exist (see xsvg.org) and have been
used for some test programs. There are still lots of planned but
unfinished features, (eg. decent text management). What's there
already seems to work, but the libraries have not yet been used in any
serious development effort --- once that happens I'm sure the
deficiencies will become much more apparent.

 > Is there a demand?

Xr is an attempt to provide an easy-to-use, high-level interface to
the rendering support provided by the RENDER extension. Xc sits under
it and emulates the functionality of RENDER on the client side for
servers without the RENDER extension. Xc also allows all of the Xr
operations to target a client-side buffer without needing an X server
at all (I'm about ready to commit this functionality any day now).

So if you want to have access to the (hopefully) hardware-accelerated
rendering exported by RENDER, but you'd prefer to be able to work at
the level of spline paths rather than trapezoids, then Xr may be able
to help.

 > How does it differ in capability from the Display PostScript code.

The essential difference is that Xr does not embed an entire
interpreter for the PostScript language into the server. Xr borrows
the imaging operators from PostScript, but ignores the rest of the
PostScript language --- simply providing a C interface instead.

Also, Xr uses the RENDER imaging model which has support for
alpha-blending so it actually matches the PDF 1.4 model more than the
PostScript model.

 > 14. Native SVG support.  -- SVG Extension?

Funny you should mention that. One of the first test applications for
Xr/Xc is an SVG library/viewer called xsvg. Take a look at some of the
test renderings if you're interested:

	http://xsvg.org/status/

Xr makes it quite easy to do graphics like this.

As far as an extension goes, it probably only makes sense to put
something in the server if it can be directly supported by the
graphics hardware. The RENDER extension should provide all the server
support necessary in this sense for SVG graphics.

This thread was originally about the roadmap of XFree86 5.0, so I
should comment on that I think. Xr/Xc exist as client-side libraries,
so it shouldn't be a problem at all to release them independent of any
X server release.

-Carl

-- 
Carl Worth                                        
USC Information Sciences Institute                      cworth@isi.edu