首页/ 接口索引/ 效果

shape.CreateContour(Offset)

轮廓图:往外或往内一圈圈描边,做霓虹字、贴纸描边、地图边界。偏移量是文档单位。

签名

shape.CreateContour(Offset)

说明

轮廓图:往外或往内一圈圈描边,做霓虹字、贴纸描边、地图边界。偏移量是文档单位。

Python 示例(可直接运行)

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

try:
    eff = shape.CreateContour(0.1)                  # 0.1 = 偏移量(文档单位)
    print("轮廓图已建立,类型:", eff.Type)
except Exception as e:
    print("建立轮廓图失败:", e)

关于本类:效果

这一块在 VBA 里是被包装过的:Shape 上有 CreateXxx 系列方法,调用后返回一个 Effect 对象,具体参数再去 Effect 的 Blend / Contour / DropShadow / Extrude / Lens / Envelope / Perspective / Distortion 子对象上改。

同类其他接口