Hi alll, I’m facing an issue while retrieving the value of rotation angle and shear angle which is applied to the image.
///////////////////retrieving rotation angle//////////////////////////
var matrix = graphicFrame.matrix; var angle = Math.atan2(matrix.mValueB, matrix.mValueA); var rotation_angle = angle / Math.PI * 180;
/////////////////retrieving shear angle////////////////////////
var shearAngle = 180 / Math.PI * Math.atan2(matrix.mValueC, matrix.mValueD);
The above script will work properly only if the image has applied either rotation or shear angle.if the image has applied both rotation and shear angle in this time the above script will give wrong value. can anyone please help me to get the solution. I want to retrieve the value of shear and rotation angle using script.
Anyone please help me to get the solution. I'm facing an issue while retrieving rotation and shear angle of the image.
Assuming that shear is to be calculated as whatever is left after deducting “rotation from horizontal” (the result of the first equation), you’ll want to start with the difference between mValueB and mValueC. So your second equation is already wrong. Beyond that, as I said first time around, you’re talking math. Folks here are typically working artists whose high-school math, if they ever had much, is probably shot. As @femkeblanco says, go ask a geometer instead.