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

shape.SetRotationCenter(X, Y)

指定旋转中心。把中心设到页面正中间,再转一圈就是"放射状排版",做角标、花瓣排列很省事。

签名

shape.SetRotationCenter(X, Y)

说明

指定旋转中心。把中心设到页面正中间,再转一圈就是"放射状排版",做角标、花瓣排列很省事。

Python 示例(可直接运行)

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

shape.SetRotationCenter(page.CenterX, page.CenterY)  # 中心设到页面正中
print("旋转中心:", shape.RotationCenterX, shape.RotationCenterY)

for i in range(6):                                   # 每 60 度复制一份
    dup = shape.Duplicate(0, 0)
    dup.Rotate(60 * (i + 1))
print("已绕页面中心排 6 份")

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

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

同类其他接口