[cairo] [PATCH] Path clipping

Kristian Høgsberg krh at bitplanet.net
Tue Jun 14 20:25:42 PDT 2005

Carl Worth wrote:
> The only thing I noticed in the patch is a small thing missing that
> should make a big difference. _cairo_gstate_init needs:
> 	gstate->clip.mode = _cairo_surface_get_clip_mode (target);
> And without that, some of the tests fail some assertion.

I've committed this now.  I had the above change in my working copy, but 
I made the patch before running the tests.

> In general, I don't love the way that gstate is now mucking with the
> initialization of two extra levels of nested structures on its own
> (gstate->clip and gstate->clip.path). Though most of the clip.path
> manipulation is actually abstracted into independent _cairo_clip_path
> functions. But don't worry about fixing this, as I just found a patch
> that I had misplaced for cleaning up _cairo_gstate_init_copy, and
> fixing this will work well into that patch.


> Beyond that, we need to come up with a better way for testing PDF
> output. My initial version of the pdf-surface test drew just a smiley
> face since that's pretty easy to visually verify. And the point of
> that test was just to verify that we could output _something_ in PDF,
> (eg. without crashing and without producing empty output).
> This patch adds another page to the output of pdf-surface which tests
> significantly more complex capabilities of the PDF backend. Perhaps
> this should be in a new test instead? And the results aren't easy to
> verify visually. Shall we make the test suite depend on poppler so
> that we can do reference-image-based verification of the PDF output?
> (Though the circular dependency that would introduce into the test
> suite could be a nuisance.)

For now I've just split out the clip test to a separate file and added 
comments about what it's testing and how it's supposed to look.  I think 
a poppler based automatic test is a good idea, but I don't think cairo 
poppler is quite stable enough yet.  I'm still relying on cairo snippets 
for testing :-)


More information about the cairo mailing list