[cairo] Fwd: cairo path rendering bug with inkscape

bulia byak buliabyak at gmail.com
Sat Apr 5 12:48:20 PDT 2008


OK, while I'm still not sure about the correct behavior of close_path,
I just eliminated it by replacing it with a lineto to the remembered
start-of-path point, and that got rid of the bug. Thanks for helping
to figure this out, and sorry for bothering you with this :)

On Sat, Apr 5, 2008 at 2:40 PM, bulia byak <buliabyak at gmail.com> wrote:
> On Sat, Apr 5, 2008 at 9:54 AM, Carl Worth <cworth at cworth.org> wrote:
>  >  It was easy enough to see where inkscape is using cairo_move_to
>  >  instead of cairo_curve_to:
>
>  Thanks for investigating this Carl, I looked into that optimization
>  and tested it and I think it works as designed, at least for that
>  file. Note that Inkscape draws screen in (usually horizontal) strips,
>  so the entire feed_curve_to_cairo is called once for each strip. And
>  in this file, it so happens that the logo sits on the boundary between
>  the strips. So for one strip, some of the curves are replaced by
>  movetos, and for the next strip, some others. Some curves overlap both
>  strips and will be drawn twice, some only once. I don't see what might
>  go wrong here.
>
>  I then wondered how replacing a curveto with a moveto in any path may
>  result in drawing a _line_ which was _not in the path_. But then I
>  remembered about the close_path command, z. If some curves preceding
>  it were replaced by movetos, it will indeed draw a line from the last
>  stroked point which will be wrong. But then the question is, is it
>  correct to draw a closepath command from the last stroked point, not
>  from the current point? If closepath would work from the current
>  point, as set by movetos, there would be no bug here.
>
>  --
>  bulia byak
>  Inkscape. Draw Freely.
>  http://www.inkscape.org
>



-- 
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org


More information about the cairo mailing list