Hello,
I would like to perform flip and +/-90� rotation on an image but after a rotation, the flip is performed in the wrong direction my code looks like this :
/*axis at the center of image*/
g2D.translate(width/2,height/2);
g2D.scale(-1,1);
g2D.rotate(Math.PI);
/*image orientation correction*/
g2D.scale(1,-1);
/*rotation and flip*/
g2D.rotate(flipHorizontal*flipVectical*Math.toRadians(angle));
g2D.scale(flipHorizontal,flipVectical); //1 or -1
/* drawing the image */
g2D.drawImage(imageToDraw, centreToX,centreToY, null);
// than positioning the axis back to origine
I've tried to say that if the image as already been rotated then invert the flips, but in that case, after one flip the rotation is performed in the wrong direction...
Does anybody know how to solve this problem???
Thank you in advance.