Hi,

I think the reason it doesnt "just work" is that path.arc() is
something one would use to build up a "proper" path. path.line() and
path.circle() are "proper" paths and path.arc(), path.lineto() etc are
things you can pass to path.path() to make a new "proper" path.

My reasoning comes from <http://pyx.sourceforge.net/manual/node6.html>

My guess how to do what you want to do is:

c = canvas.canvas()
arc = path.path(path.arc(0,0, 1, 45,180))
c.stroke(arc)
c.writePDFfile("an-arc")


tim
ps. note-to-self hit reply all next time!

On 24/02/2008, Alan Bromborsky <[EMAIL PROTECTED]> wrote:
> Here is my test code:
>
>     c = canvas.canvas()
>     ARC = path.arc(0.0,0.0,1.0,45.0,180.0)
>     c.stroke(ARC)
>     c.writeEPSfile('dlines.eps')
>
>  and here are the error messages:
>
>  Traceback (most recent call last):
>   File "circles.py", line 107, in <module>
>     c.writeEPSfile('dlines.eps')
>   File "/usr/lib/python2.5/site-packages/pyx/canvas.py", line 330, in
>  wrappedindocument
>     return method(d, file)
>   File "/usr/lib/python2.5/site-packages/pyx/document.py", line 155, in
>  writeEPSfile
>     pswriter.epswriter(self, file, *args, **kwargs)
>   File "/usr/lib/python2.5/site-packages/pyx/pswriter.py", line 331, in
>  __init__
>     page.processPS(pagefile, self, acontext, registry, pagebbox)
>   File "/usr/lib/python2.5/site-packages/pyx/document.py", line 138, in
>  processPS
>     self._process("processPS", *args)
>   File "/usr/lib/python2.5/site-packages/pyx/document.py", line 81, in
>  _process
>     getattr(self.canvas, processMethod)(canvasfile, writer, context,
>  registry, bbox)
>   File "/usr/lib/python2.5/site-packages/pyx/canvas.py", line 193, in
>  processPS
>     item.processPS(file, writer, context, registry, nbbox)
>   File "/usr/lib/python2.5/site-packages/pyx/deco.py", line 206, in
>  processPS
>     bbox += strokepath.bbox().enlarged_pt(0.5*acontext.linewidth_pt)
>  AttributeError: 'arc' object has no attribute 'bbox'
>
>  I know what bounding box I want, but I cannot figure out how to set it
>  manually.
>  Any help would be greatly appreciated!!!!
>
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  PyX-user mailing list
>  [email protected]
>  https://lists.sourceforge.net/lists/listinfo/pyx-user
>


-- 
http://tim.jottit.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to