Hi,
First, let me thanks you for all your clear comments.
>
> This is, in my mind, both a usage and a design flaw.
>
> You are creating (and throwing away) instances of drawable
> objects to the draw method of a paper instance. But what does
> paper.draw() actually do with the
Tool69 a écrit :
> Hi,
> I've got a simple but difficult problem :
>
> Suppose I've got a Paper class, on wich I can draw i.e a rectangle, a
> circle or whatever.
>
> class Paper(...):
> def __init__(self, paperx, papery):
> self.paperx = paperx
> self.papery = papery
>
Dennis Lee Bieber a écrit :
>
> Perhaps you missed that the loop (in Paper) that invokes each
> primitive's draw() is passing itself (the Paper instance)...
>
Oops, sorry I missed it in fact.
But I still have a problem with my the primitives (some pathes I had to
build ):
i.e a mathematic
Dennis Lee Bieber a écrit :
> On 10 Dec 2006 03:47:21 -0800, "Tool69" <[EMAIL PROTECTED]>
> declaimed the following in gmane.comp.python.general:
>
> > Thanks for your answers,
> > I though about the first solution too, but I've redundant code, say ie:
> > p = Paper(100,200)
> > p.draw( Rectangle