I have ImageIcon face
, I don't know how to use command rotate
to rotate player face. I know that the rotation is for point 0, 0
. But how to use for rotate only one item?
My code is:
int size = 40;
int angle = getAngle(); // in degree...
g2.rotate(Math.toRadians((double)angle); //????????
g2.drawImage(face.getImage(), size * col, size * row, null);
Can anyone advise me?
Thank you.