在裁剪时,旋转具有多个路径且左上位置的对象时,该对象的放置位置不正确
var targetTop = (OriginalTarget.top * actObj.scaleX);
var targetLeft = (OriginalTarget.left * actObj.scaleY);
var convertToAngle = function(matrix) {
var values = matrix.split('(')[1],
values = values.split(')')[0],
values = values.split(',');
var sin = values[1];
return Math.asin(sin) * (180/Math.PI);
};
var matrixVal;
var cAngle;
var targetRotate;
if(fillElement.transformMatrix){ // Here transformMatrix - matrix(0.75, -0.566, 0.4567, 1.1243, 0, 0)
matrixVal = "matrix("+fillElement.transformMatrix.toString()+")";
cAngle = convertToAngle(matrixVal);
targetRotate = cAngle + targetAngle;
}else{
cAngle = 0;
targetRotate = 0;
}
旋转后我应该如何获得左位和顶位