[libcroco-list] SXGdi/SXGtk addition to Sewfox



Hi all,

I have recently commited the patch
dodji gnome org--xml-style-2004/sewfox--mainline--0.1--patch-6 to split
(logically) the sewfox layouter and the renderer.

Basically, this patch adds a "Graphical Device Interface" that abstracts
the graphical device (which is Gtk+ today) for the layout engine. The
name of the interface is SXGdi.

Just for a recall, the job of the layout engine is to layout the boxes
of the box model in a 2D space.
The rendering engine then takes this layed out box model, and renders it
on a Graphical Device, or I should say, on a media (hmmh, maybe I should
have called the thing "Media Interface" and not Gdi.).

It appeared that the layout engine needs some informations/apis from the
graphical device (yeah, the layout engine, the one that comes *before*
the rendering engine), like some font metrics, some device size
information etc ...

What the patch does so far is to make sure the layouter doesn't depend
on the Gtk/Gdk, but rather on an abstract interface. A specific
implementation can be provided for that interface. Today, I have written
an SXGtkDi (Gtk Device Implementation) that implements the SXGdi
interface.

It is now possible to stand up and write a PDF device implementation or
a postcript device implementation to leverage on the Layout engine
capabilities and generate a PDF or postscript output, from an xml + css
document. One would also need to write a specific rendering engine
though because I don't really feel the need to abstract the rendering
engine too. I think it is better (w.r.t platform integration) to have
one native renderer per media.

As usual, this patch is supposed to work with the last patch of the
libcroco--mainline--0.6 version which is
dodji gnome org--xml-style-2004/libcroco--mainline--0.6--patch-20 .

Thank you for reading.

Dodji.




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