javagraphicsawtmotion-blur

Getting awt.Image data from Graphics2D (JAVA)


I'm creating a poor motion blur effect for my game engine, and I have a five index array of images I named MotionBlur[].

Every time my graphics object finishes drawing to the screen, I need to store that data into MotionBlur[0]. Each frame the images get moved down from 0 to 4, then kicked out. I'll draw each following image after the last, with different, appropriate transparencies.

All I'm asking is how to store Graphics2D data into an awt.Image.

all help is appreciated


Solution

  • I'd do it the other way around if you can.