Hello,

On 21.09.06, Andre Wobst wrote:
> On 16.09.06, andrea valle wrote:
[ snip ]
> > Just a curiosity.
> > I'm having some design difficulties with PyX.
> > In fact, typically I have to create some objects (i.e. boxes) and then 
> > to stroke them on a canvas passing color and other attributes (e.g. 
> > deformers).
> > So I have to define stroking function in order to pass them my objects.
> > The main idea in PyX  is that you have geometrical info in the object 
> > and other "layout" info is provided by canvas methods.
> > 
> > This way of working is substantially procedural.
> > To say in pseudo-code:
> > canvas.stroke(object, red)
> > 
> > It would be nice to write in a OO way:
> > object.color = red
> > object.stroke(canvas)
> > 
> > So you can have thousands of object with all their layout properties 
> > (e.g. color, smoothing, rotation), and you decide to paint them calling 
> > a stroke method and passing the canvas.
> > 
> > Probably in a data plotting/graphing perspective is an unrelevant 
> > problem, but in graphical one it would be really nice.
> > 
> > What do you think?
> 
> What you're talking about is that the canvas is an object which has
> some intrinsic attributes attached with. While this is an resonable
> approach, the PyX development is going to go into a very different
> direction.
[snip]

I fully agree with what you said here, but...

> Beside that I do understand your point in wanting to set global
> properties. But this is something different. 
[snip]

... I think you misunderstood Andrea here. He does not want to set global
properties but local ones.

So I would say the following. Currently the canvas is the PyX way to
"annotate" objects with attributes like

   ap = canvas.canvas(p, attributes)

However it's not yet clear, whether this will be possible in the future
since we are thinking of removing the attributes argument of the canvas.
But this has not yet been decided.

        Jörg

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to