سؤال

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

هل كانت مفيدة؟

المحلول

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

  • Paint the effects to a backing buffer, which is stored in the MotionBlur array
  • Paint the buffer to the screen
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top