Quote:
// load image
try {
albatros = ImageIO.read(getClass().getResource("Alba.png"));
} catch (IOException ioe) {
ioe.printStackTrace();
} catch (IllegalArgumentException iae) {
albatros = null;
}
Graphics2D g2a = null;
g2a = (Graphics2D) albatros.getGraphics();
g2a.rotate(-App.item.alfa / 180 * 3.1415, albatros.getWidth() / 2, albatros.getHeight() / 2);
g2a.drawImage(albatros, 0,0,this);
g2a.dispose();
g.drawImage(albatros, (int) App.item.x - albatros.getWidth() / 2, (int) App.item.y - albatros.getHeight() / 2, this);
g.drawLine(x, y, x, y);
g.dispose();
At the end of process g2a no have the only the rotate image, but the original orientation of image with print on the new image after rotation.