[cairo-bugs] [Bug 29463] Bézier curve is not rendered correctly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 12 04:50:43 PDT 2010


https://bugs.freedesktop.org/show_bug.cgi?id=29463

--- Comment #4 from Martin Horák <horakm at centrum.cz> 2010-08-12 04:50:41 PDT ---
I briefly take a look at the code and it seems the problem in this specific
case lies in incorrect decomposition of bézier curve into the separate (thick)
line segments for stroking operation.

The implemented decomposition algorithm (widely used and robust Casteljau)
focuses on finding points on a bézier curve. In each subdivision, the
difference from curve to ideal zero-thick line segment is evaluated. If the
line segment diference to curve falls below a tolerance threshold, the line
segment is outputted as a curve approximation. In this sense, there is nothing
wrong and I assume that for filling operations, the current implementation
works perfectly.

However, when this decomposition (with the same error criteria) is used for
stroking operation, it may miss some part of curve, where tangent is changed
rapidly, although a curve approximation by an ideal line is almost perfect.

In my opinion, for fixing this issue, there is no need to change the stroker or
decomposition algorithm, but just update the error criteria to take into
account
a tangent of two points on the curve (in case the decomposition itself serves
as an input to the stroking operation).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list