<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Bezier curve with matching start/end and control points is not rendered correctly"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101763#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Bezier curve with matching start/end and control points is not rendered correctly"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101763">bug 101763</a>
from <span class="vcard"><a class="email" href="mailto:psychon@znc.in" title="Uli Schlachter <psychon@znc.in>"> <span class="fn">Uli Schlachter</span></a>
</span></b>
<pre>What happens is:
_cairo_path_fixed_stroke_to_polygon is called and in its curve_to() callback it
calls _cairo_spline_decompose() on this curve.
The original curve is (100,100)->(200,200)->(200,200)->(100,100) (these are its
four control points) and it is decomposed into the following two curves:
(100,100)->(150,150)->(175,175)->(175,175)
(175,175)->(175,175)->(150,150)->(100,100)
The error now is 0 so points are added. The add_point callback of the spline is
spline_to() and it gets the following arguments:
spline to (175,175) with tangent (0,0)
spline to (100,100) with tangent (-100,-100)
The problem is the tangent (0,0), which means that spline_to() just calls
add_fan(). At this point I am lost on what is going on. This code ignores the
point argument and only uses the passed-in point. Thus, only "things around
(100,100)" happen.
With the following patch, things work as expected. Since I have no clue about
the algorithm, I'm not sure how incorrect this is. I guess that the thought
here was "tangent (0,0) can only happen if the points are all the same", which
this example shows is wrong. However, since this is just a guess, I'll hope
that someone with more of a clue looks at this. Oh and: The test suite should
be checked for regressions.
Chris?
Andrea?
Anyone with some clue about this?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>