Hi all,
I committed a part of my GSoC work, a Cairo-based simple, naiv SVG renderer which will help to have better quality PDF export. It can be found in extension/internal/cairo-render* and there's a new showGlyphs function in class Layout (Layout-TNG-Output.cpp). Its raster output can be considered usable and might be useful for testing Cairo vs. libnr rendering performance. The new output types in 'Save As' are: 'Cairo PDF experimental' and 'Cairo PNG' (this doesn't have any options yet unlike the PNG export function). Currently the renderer doesn't have any obvious optimization like creating surfaces with only the needed bbox size and not of the full size of the output. It needs Cairo 1.2 since it uses cairo_pop/push_group calls so I have wrapped the code around HAVE_CAIRO_PDF which ensures the correct API version. The SVG element-specific rendering methods are in static methods named like sp_flowtext_render so they could be easily put into the virtual methods of the objects representing these elements in other source files. Please consult the source code for more details (cairo-renderer.cpp). The Cairo-specific rendering part can be found in cairo-render-context.cpp. This renderer supports clipping (objectBoundingBox clipping doesn't work -- does anyone have an idea what could be wrong?), masking, and surface patterns in SVG, among the other straightforward things. I wanted to have more things implemented properly but since September I didn't really have much time to spend on this so I decided to release it in its current state so you can tear it apart :) Unfortunately I haven't finished the Cairo-PDF patches for it yet. I have a working version which is quite unstable with text (isn't shown in layers except for the 'root' layer) and images and which supports masking with constant alpha. I cannot release it because it's such a mess at this point. I know the main problem with this exporter is the fact that first the support needs to be built into Cairo in order to take advantage of this exporter and that won't happen overnight, but at least now Inkscape has a simple Cairo-based SVG rendering backend. I hope to get the Cairo-PDF patches into Cairo 1.4.x. Any ideas, comments regarding the subject are welcome.
Cheers, miklos