Redirect drawing to a different PGraphics item?
in
Programming Questions
•
2 years ago
I have a drawing function that draws to an offscreen graphics buffer, but would also like for the function to be able to draw to the PApplet as well. Is this possible?
Code example:
- PGraphics gfxBuffer;
- gfxBuffer = createGraphics(theWidth, theHeight);
- drawSomething(); //offscreen, save to file
- gfxBuffer = _______ ?
- drawSomething(); //onscreen, current PApplet
1