日期:2014-05-20 浏览次数:20741 次
if(offScreenImage == null)
offScreenImage = createImage(GameFrame.SNAKE_WIDTH,GameFrame.SNAKE_HEIGHT);
Graphics2D g2 = (Graphics2D)offScreenImage.getGraphics();
final BufferedImage compatible = GraphicsEnvironment
.getLocalGraphicsEnvironment()
.getDefaultScreenDevice()
.getDefaultConfiguration()
.createCompatibleImage(image.getWidth(), image.getHeight(), image.getTransparency());