Code:
AffineTransform at = new AffineTransform();
at.scale(2, 1);
at.rotate(Math.toRadians(45));
at = new AffineTransform(at);
at.translate(-img.getWidth()/2, -img.getHeight()/2);
g2D.setTransform(at);
g2D.drawImage(img, 0, 0, null);
g2D.drawImage(img, 16, 0, null);
g2D.drawImage(img, 32, 0, null);
g2D.dispose();
This draws my image (original size 16x16) at locations [0,0], [16,8], [32,16]. i.e. it takes the original axis which is now transformed and draws it on the transformed coordinates.
However, I do not always want this. How can I get the image to display at the exact coordinates I am feeding into it, ignoring the transformed X axis and Y axis?