[cairo] [patch] Proposed fix for the miter bug (#7245)

Michael Urman murman at gmail.com
Mon Oct 29 23:08:12 PDT 2007


On 10/29/07, Carl Worth <cworth at cworth.org> wrote:
> On Mon, 29 Oct 2007 18:00:53 -0700, Carl Worth wrote:
> > I'd appreciate anyone looking over the diagrams and algebra to ensure
> > I didn't botch anything.
>
> Even moreso now since I've verified that indeed I have botched
> something.

I think I found an error in the final algebraic steps:

2/(1 - cos(psi)) - 2 + (1-cos(psi))/2 > 4 * (tolerance/line_width)²
times 2 does not yield
4/(1 - cos(psi)) - 8 + (1-cos(psi)) > 8 * (tolerance/line_width)²
instead it yields
4/(1 - cos(psi)) - 4 + (1-cos(psi)) > 8 * (tolerance/line_width)²
thus
4/(1 - cos(psi)) + (1-cos(psi)) > 8 * ((tolerance/line_width)² + 0.5)

I think fixing this will cause more angles not to fall through into
bevels, so that could match the symptoms described.
-- 
Michael Urman


More information about the cairo mailing list