Hooks

Hi everyone!

What do you think about hooks / callbacks in of drawing functions? The idea came to my mind when I was playing around with the ofVectorGraphics addon. It works nicely, but it destroys the API’s natural flow as you have to use the addon functions for rendering (at least for the objects you’d like to include in PS output). Wouldn’t it be much nicer to just write something like output.begin(), then render stuff as usual and at the end call output.end()? This could be achieved by including hooks (callback functions) in all of the major of drawing functions. The ofVectorGraphics addon could then register callbacks for the hooks in advance. I guess this could be useful for a couple of other applications as well…

This is just a quick idea and I have not yet put any effort in evaluating whether it’s a good one or not. I don’t even know if someone has requested this already, only did a quick search and did not find any matches. So I say sorry in advance if this is a redundant post.

Regards,
Toby

A lot of this kind of tuff will be taken care of once .06 comes out with all it’s poco events glory.