[cairo] [Fwd: Problem with stroke vs. fill]

Duncan Mak duncan at ximian.com
Fri Apr 2 15:43:01 PST 2004


Hello,

Carl asked me to post this question to the list so that we'll have
archived for others to see, he'll be posting his reply to me as well.

Duncan.

-----Forwarded Message-----
> From: Duncan Mak <duncan at ximian.com>
> To: Carl Worth <cworth at east.isi.edu>
> Cc: Ravindra Kumar <rkumar at novell.com>
> Subject: Problem with stroke vs. fill
> Date: Fri, 02 Apr 2004 02:09:11 -0500
> 
> Hello Carl,
> 
> Thanks so much for working on Cairo, I've been happily using it to
> implement the various 2D geometry drawing/filling functions in the GDI+
> Graphics class. We're making good progress!
> 
> I found an algorithm [1] from the comp.text.pdf FAQ for drawing
> elliptical arcs using bezier curves. Using this algorithm, I was able to
> implement the functions for drawing and filling arcs and pies.
> 
> I noticed tonight that my FillPie implementation is incorrect for cases
> where the sweep angle is equal or greater than 180, even though DrawPie
> works fine. Instead of drawing a line back to the absolute center, it
> draw a line to the center of the top/bottom edge (depending on the
> angle).
> 
> The code paths used by both functions (Draw and Fill) are identical,
> except FillPie calls cairo_fill, whereas DrawPie calls cairo_stroke.
> 
> All being the same, with stroke working and fill not working, I'm
> wondering, is this a Cairo bug?
> 
> Thanks,
> 
> Duncan.
> [1] http://www.stillhq.com/ctpfaq/2002/03/c1088.html#AEN1212




More information about the cairo mailing list