标签:style blog color for sp div log bs new
1 private Image offImage = new BufferedImage(800, 700, BufferedImage.TYPE_INT_RGB);//在内存中new一张图片出来
1 public void paint(Graphics g) { 2 Graphics offG = offImage.getGraphics();//得到内存图片的画笔 3 super.paint(offG); 4 for (Shape shape : shapes) { 5 if (shape != null) { 6 shape.draw(offG);//把图形画到内存图片上 7 } 8 } 9 g.drawImage(offImage,0,0, null);//把内存中的图片画到屏幕上 10 }
标签:style blog color for sp div log bs new
原文地址:http://www.cnblogs.com/f644135318/p/4077365.html