[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

Andrea Canciani ranma42 at gmail.com
Tue Jul 28 07:43:31 PDT 2009


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.

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.
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.

Andrea Canciani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rel_curve_to.diff
Type: application/octet-stream
Size: 606 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090728/a6cefb06/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: degen_curve_to_line.diff
Type: application/octet-stream
Size: 2268 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090728/a6cefb06/attachment-0001.obj 


More information about the cairo mailing list