public void draw(Graphics2D g2d) {
rotate.translate(location.x, location.y);
rotate.rotate(rotation);
rotate.translate(-location.x,-location.y);
g2d.setTransform(rotate);
g2d.drawImage(currentAnimation.getCurrentFrame(), (int) location.x, (int) location.y, null);
}
g2d is passed in from the paint method, it is obviously representing the entire contents of the panel. Should every image on the screen have it's own separate instance of graphics so I can only apply the AffineTranformation to it, without applying it to everything else?
Also, all of the coordinates are changing. The force applied by vectors rotate with the everything else. :\
Thanks. None of the search results could clarify this for me.
Edited by nkarasch, 09 December 2012 - 06:20 AM.






