diff --git a/app/service/design_fast/utils/synthesis_item.py b/app/service/design_fast/utils/synthesis_item.py index 6f38fbd..b380a81 100644 --- a/app/service/design_fast/utils/synthesis_item.py +++ b/app/service/design_fast/utils/synthesis_item.py @@ -367,7 +367,7 @@ def transpose_rotate(layer, image): # ------------------- 核心修改:计算实际旋转角度 ------------------- # 结合镜像状态,计算需要实际执行的旋转角度 actual_rotate = calculate_actual_rotate(original_rotate, is_mirrored_x, is_mirrored_y) - + print(f"actual_rotate:{actual_rotate}") # ------------------- 执行镜像变换 ------------------- # 左右镜像(transpose[0] != 1 即-1,表示镜像) if is_mirrored_x != 1: @@ -416,9 +416,9 @@ def calculate_actual_rotate(before_rotate, is_mirrored_x, is_mirrored_y): actual_rotate = -before_rotate elif is_mirrored_x == 1 and is_mirrored_y == -1: actual_rotate = -before_rotate - elif is_mirrored_x == -1 and is_mirrored_y == -1: - actual_rotate = before_rotate + 180 + # elif is_mirrored_x == -1 and is_mirrored_y == -1: + # actual_rotate = before_rotate + 180 # 角度标准化到0-360度 normalized_rotate = ((actual_rotate % 360) + 360) % 360 - return normalized_rotate \ No newline at end of file + return normalized_rotate