Render to an image
in
Programming Questions
•
2 years ago
Hello everyone, I have this question, which may have been asked many times already, but I cannot find any reference on this topic regarding a method, applicable for Processing.
The point is that I want to be able to draw to an image thus creating my custom rendering canvas. The image is then to be placed into a custom GUI window. Thus the result will be a window inside my program, which holds an area, dedicated for graphical output. The main idea is to create a resizable and moveable rendering viewport inside my main programs window... How can I do this? Is there any better way than rendering to an image?
EDIT: I have found that an instruction like
PGraphics pg = createGraphics();
might save me but it confuses me that the reference says that the createGraphics() method returns Pimage!!! So should I manage to use these methods somehow? I want to be able to use the standard line(), image() and other functions for this my custom context..
2