[cairo] SVG backend patch
emmanuel.pacaud at univ-poitiers.fr
Mon Aug 1 12:54:44 PDT 2005
Le mercredi 27 juillet 2005 à 20:51 -0400, Kristian Høgsberg a écrit :
> > Not that I'm very proud of it, as it does almost nothing, but Carl told
> > me to send it to the list, so, here it is...
> That's pretty good, all the boilerplate code is in place
That's your work with s/pdf/svg/g applied on it:)
> surface->fill_path() is working. Next steps could be to get
> emit_solid_pattern() working. Also, getting composite_trapezoids()
> working would make strokes work, so that's also worth looking into. I'm
> thinking that the 'polygon' element would work well for trapezoids.
You'll find attached the next iteration of my work in progress patch. It
adds support for composite_trapezoids. As composite trapezoids will not
produce acceptable SVG, I've also added an early fallback for stroke,
and the corresponding function in SVG backend.
> Text is probably going to be a bit more tricky, since the svg text
> operators seem more highlevel than the show_glyphs() cairo backend
Will work on it after basic drawing is in place.
> And I'm not sure what's the right thing to do for fonts - we
> could certainly generated an svg font subset to embed in the svg file,
> but I'm not sure how many svg viewers support that, and we loose hinting
> when we do that.
I guess viewers should be smart enough to use a local font instead of
> Anyway, I think your work looks promising, keep it up. By the way, I
> usually use a small script like this (make-patch.sh):
> NEW_FILES="test/svg-surface.c src/cairo-svg-surface.c src/cairo-svg.h"
> cvs diff -Nau
> for f in $NEW_FILES; do diff -au /dev/null $f; done
> for creating a diff containing changes and new files. It's easier to
> review and comment here on the list.
Thanks for the hint.
What is also new in this version is the use of libxml. Please tell me if
you feel this is wrong (or anything else in the patch).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 41985 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050801/b04bc836/cairo-svg-07.bin
More information about the cairo