[cairo] PDF Backend for cairo
Kristian Høgsberg
krh at bitplanet.net
Tue Nov 30 19:10:12 PST 2004
Ross McFarland wrote:
...
> pretty much the conclusion i came to. i got bogged down and spent
> several sessions trying to fix the transparency/tessilation problems and
> never got around to doing anything else with my backend.
What kind of problems did you run into, more specifically?
>>where [ gstate ] means that the current line cap, line join, line width,
>>fill rule etc should be passed to the backend. I'm not sure what the
>>best approach would be: either just pass the relevant part of the state
>>in the call or let the backend query the gstate object directly.
>>cairo_gstate_t isn't exposed to the backends elsewhere, so I'm thinking
>>that's not a good idea. The cairo core would call these functions
>>before tesselating and if they return other than CAIRO_STATUS_SUCCESS,
>>cairo falls through to the cairo tesselator. This is basically how the
>>other backend hooks work.
>
> the graphics state would be somewhat tricky since both cairo and pdf
> have them and they would to some degree need to be kept in sync for the
> above to work well.
I don't see this as a big problem, the pdf backend could just keep a
copy of the current state and update the bits that have changed. Or it
could just set the entire state every time, which still would be saving
space compared to putting the tesselator output in the PDF.
cheers,
Kristian
More information about the cairo
mailing list