[cairo] Solving the self-intersecting stroke
chris at chris-wilson.co.uk
Wed Oct 1 15:48:46 PDT 2008
Behdad, lets get twin.c into the test suite, it exercises more of the
Bentley-Ottmann tessellator than all of the other tests!
As the keen observer will see, along with some refinement I also
introduced a very nasty bug that was causing trapezoids to be lost.
Carl could you please review the attached patch for correctness. I
believe I've found an issue with _cairo_bo_sweep_line_compare_edges() in
the manner in which it compares the current points along the two edges.
if (ax.rem < bx.rem)
is a buggy construct as the remainder is a fraction of its divider, so
the correct test would look like:
if (ax.rem/ady < bx.rem/bdy)
modulo performing the integer arithmetic correctly.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 0 bytes
Url : http://lists.cairographics.org/archives/cairo/attachments/20081001/7f515ed1/attachment.bin
More information about the cairo