Hi,
This is a suggestion/question about the guts of Processing.
I'm right now coding a library and I'm running into a little problem.
I have in my library some classes which I would like to contain a function draw(PGraphics g) in order to allow them to draw "themselves" in any given PGraphics, PGraphics2, PGraphics3, PGraphicsGL object we pass to them. So I have must I implement three different draw() methods with three different signatures each time?
I think it would be better having a PGraphicsInterface and all the PGraphics* implement from. That would allow people to implement their own PGraphics renderers and other people access those objects transparently without knowing the renderer, like my case.
I just saw, that PGraphics* extend from PGraphics, so it should work with one only signature for draw().
But I still don't understand why not having an interface and implementing it for each different renderer. It seems like the academic example for making use of interface
. But then, I'm quite a beginner and maybe I'm missing something.
Thanks for the aclarations.