[cairo] [cairo-commit] 7 commits - src/cairo-path-fixed.c src/cairo-pdf-surface.c src/cairo-rtree.c src/cairo-rtree-private.h src/cairo-spline.c src/cairo-xlib-display.c src/Makefile.sources test/Makefile.am test/Makefile.sources test/meta-surfac

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 29 08:32:22 PDT 2009


On Tue, 2009-07-28 at 16:43 +0200, Andrea Canciani wrote:
> There is one more bug in (false) degenerate curves handling in
> _cairo_path_fixed_rel_curve_to.
> Please apply the first patch to fix this.

Thank you Andrea, I've pushed the fix and yet another test case. In a
positive light, at least this particular aspect will be well tested in
future!

> The second attachment implements (hopefully in a mathematically
> correct way) the handling of degenerate curves. It makes
> degenerate-curve-to fail because the lines it draws are fully black
> (the splines were gray at the extreme points), but it's visually
> correct if you inspect the output by hand, as might be guessed by the
> fact that it passes curve-to-as-line-to.
> If you check the path it creates (I did it with some printfs, but
> tracing the code should be the right way to do... I just don't know
> how to do it) you should see that the line-to it produces are indeed
> the expected ones.

Printfs, dumping the polygon, dumping the traps... Debugging the library
is not one of Cairo's strong points. Any suggestions are greatly
appreciated.

> As Jeff already pointed out, the gain from this kind of optimization
> is probably very little for the common usage of curve_to, so it's
> still unclear to me if this change should be applied.

I'm still searching for some examples in the wild. :)
-ickle



More information about the cairo mailing list