Hi everyone!
I wanna develop a program that allows the user to create simple animations drawing each single frame.
To do this, I'd like to show the user the previous frame on the background, so he/she can see it while drawing the new one(in order to draw new one in the correct position -think, for example, to a running man-).
So I have 2 PImage objects, prev and cur. The problem shows up when I want to save to current frame: since I'm showing them both, and drawing on the window using common methods such as line, ellipse and so on, I'm not able to save just the cur frame.
So my question is: is there any way to edit a PImage itself? I would solve the problem if I there would be, for instance, a method "line" that modifies the cur.pixels array without touching the pixels array of the window.
Any help is appreciated,
To do this, I'd like to show the user the previous frame on the background, so he/she can see it while drawing the new one(in order to draw new one in the correct position -think, for example, to a running man-).
So I have 2 PImage objects, prev and cur. The problem shows up when I want to save to current frame: since I'm showing them both, and drawing on the window using common methods such as line, ellipse and so on, I'm not able to save just the cur frame.
So my question is: is there any way to edit a PImage itself? I would solve the problem if I there would be, for instance, a method "line" that modifies the cur.pixels array without touching the pixels array of the window.
Any help is appreciated,
Marco Galassi
1