I have run into similar problems as well, and have added extra "LINETO"
elements to the same final coordinates to make them go away. I'm sure I'm
either doing something wrong, or there is a bug somewhere. It also seems
like if I do a bunch of "CURVETO" segments, the final one is not drawn
properly and seems to connect to the first point instead. This is also fixed
by putting a redundant "LINETO" segment at the end of the path. I have to
look into it a little more and see if it's my misuse or a bug.

I have written a python function that generates the path code for an
approximation to a circular arc from GnomeCanvasBpaths. It works very well
for my needs. I will clean up the code and submit to the list soon. It
divides the arc into segments of less than 45 degrees to reduce the errors
of the Bpath approximation. I used the following document for inspiration:

http://www.tinaja.com/glib/bezarc1.pdf

I will try to generalize my code to work for elliptical arcs as well and
then submit it, possibly as a FAQ.

-Eric

> -----Original Message-----
> From: Johan Dahlin [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 27, 2004 4:12 AM
> To: I�igo Serna
> Cc: PyGTK
> Subject: Re: [pygtk] Drawing an arc on gnome canvas
> 
> > [EMAIL PROTECTED] inigo]$ python test-path_def.py
> > (test-path_def.py:7912): GnomeCanvas-CRITICAL **: file gnome-canvas-
> > path-def.c: line 949 (gnome_canvas_path_def_closepath_current):
> > assertion `path->end - path->substart > 2' failed
> 
> It seems to me that the message says that you must have at 
> least 3 paths
> in your GnomeCanvasPath.
> 
> -- 
> Johan Dahlin <[EMAIL PROTECTED]>
> 
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> 
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to