On 05/05/2010 10:31 PM, Stuart Axon wrote:
I haven't given these much thought yet.
Re-reading your code and comments, it's not that big a deal, because as
you say
The idea at this stage is to prove that the main problems are fixable, with
a minimal codebase.
...this is the proper way. Even in a worst case scenario where
performance doesn't differ much between trunk and your branch, there's a
lot of alternative approaches here that make sense to be placed into the
main version, which is rather crufty.
WRT Graphics:
At the moment rendering functions are in
BotImpl (renaming to BotBackend)
Yes, its purpose becomes clearer that way.
- Seems the same as Context in nodebox, but I'm not 100% sure?
I believe so -- actually, Bot/Canvas in Shoebot == Context/Canvas in
Nodebox.
I need to give some thought to how a graphics backend might work,
would they be more like cairo or more like shoebot ?
Well, the Cairo way of drawing is very close to Nodebox/Shoebot (drawing
stack, transforms, etc.). However, other backends that could be
implemented in the future (i remember you working on 3D) might not be so
close; hence the choice to have our own drawing stack and elements,
which can then be passed on to a backend.
It might help to know what other rendering backends we want.
OpenGL (Pyglet/GtkGLExt) seems like the next target. Once stuff is
stabilised, i'd also like to take a stab at implementing a Qt/Arthur
backend, which apparently can be faster than Cairo in some cases.
I want to put this off until after transforms and rendering to a window work.
Agreed, stuff should work first
At that point this'll be ready to be pulled apart and put back together
in a branch of shoebot.
Sounds like a good plan.
WRT to different grammars:
I was imagining these could be implemented by the Bot classes:
Bot -> Nodebox Strictly the nodebox API
Bot -> Shoebot Our extended API
Is that enough, or will we need different types of BezierPath etc ?
Well, these are 2 different things:
- Bots: Nodebox and Shoebot (= extended Nodebox) are the ones we have
now, plus Drawbot. Another grammar that i'd like to try would be a
Pythonic version of Processing.
- BezierPath (and Grobs in general) are the 'agnostic' representations
of drawing elements, so that any Bot will create grobs, and any
canvas/rendering backend can read them and output image. So i think
we're good with the classes that we have already.
_______________________________________________
Shoebot-devel mailing list
[email protected]
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net