[cairo] Derivation of the mitre limit
chris at chris-wilson.co.uk
Fri Sep 28 16:41:08 PDT 2007
Chris Wilson (chris at chris-wilson.co.uk) said:
> I was reviewing https://bugs.freedesktop.org/show_bug.cgi?id=7245,
> cairo_stroke_extents() gives wrong result for arcs in some cases, when I
> left scratching my head over the detailed comment that derives the
> condition for the mitre limit (cairo-path-stroke.c, line 276).
Well I pulled out the old trusty pen and paper to derive the miter
condition and agree with 1/sin(psi/2) <= ml - it's clear as soon as you
draw a diagram, so I'll try to remember to add one to the docs.
However, there is still a problem in there somewhere so I wrote a
little test case to explore a few line joints. The issue appears to be
an incorrect sign in the dot product between the intersection of two
I've attached the test case for other people to verify that it is a real
bug, and to hopefully spark some insight from those familiar with the
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 0 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20070929/0f207ae2/attachment-0001.patch
More information about the cairo