首页/ 接口索引/ 对齐 / 分布 / 变换

shape.Rotate(Angle)

绕旋转中心转,角度是度,逆时针为正。默认绕对象中心转。

签名

shape.Rotate(Angle)

说明

绕旋转中心转,角度是度,逆时针为正。默认绕对象中心转。

Python 示例(可直接运行)

依赖 pywin32。示例假定 app / doc / page / layer 已就绪。 见「连接与初始化」
Python
shape = app.ActiveSelectionRange(1)

print("转之前角度:", shape.RotationAngle)
shape.Rotate(45)                                    # 逆时针 45 度
print("转之后角度:", shape.RotationAngle)

shape.Rotate(-45)                                   # 转回去

关于本类:对齐 / 分布 / 变换

对齐参数是整数枚举(Python 里没有 cdrAlignLeft 这种常量):1 左 / 2 右 / 3 水平居中 / 4 上 / 8 下 / 12 垂直居中。可以相加组合,比如 1+4 = 左上角。

同类其他接口