[reportlab-users] Pathobjects bug
Robin Becker
robin at reportlab.com
Tue Mar 15 03:53:37 EST 2005
Christian Junker wrote:
> After I have called to start a pathobject by invoking the canvas
> method .beginPath(), I can't just draw lines directly. If I do, when
> opening the pdf file Acrobat says something about "missing operands in
> path" (I have the german version of the free Acrobat Reader).
> To fix this I use..
> <code>
> pathobj.moveTo(0,0)
> </code>
> right after I have created the pathobj. Then it works.
>
> I suggest that this should be fixed, because this call is senseless.
> It is in my understanding that if I create a pathobject, it should be
> positioned at the origin which is at the point where the canvas is
> currently located on the page (canvas._x, canvas._y).
>
I think this is wrong, perhaps (0,0) isn't on your path eg
1,1 --> 2,2 --> 2,1 --> 1,1 doesn't contain (0,0)
The initial moveto is/must be user specified. Perhaps we should consider
how to make the path object detect that no initial moveto has been made
when the first operation is added. That way the error would be raised at
the point where it is made.
--
Robin Becker
More information about the reportlab-users
mailing list