Hello JGO
im triying to diaplay a grid on a transparent bufferimage, but i can’t find a viable way to repaint it to the screen without clearing the previous transparent bufferimage effectively. here is what i have:
//Create a blank transparent buffered image:
BufferedImage grid = new BufferedImage(800, 600, BufferedImage.TRANSLUCENT);
Graphics2D pintor = grid.createGraphics();
//transfer a single prototipe tile on to my bufferedimage
prototipo.paint(pintor);
//painting it
public void printMapa(Graphics2D g){
Rectangle2D.Double rect = new Rectangle2D.Double(0, 0, pantancho, pantalto);
pintor.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0.0f));
pintor.fill(rect);
g.drawImage(grid, 0, 0, padre);
pintor = grid.createGraphics();
}
Any ideas…?