|

楼主 |
发表于 2024-12-13 17:52
|
显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
不知道你用什么语言,给你一段VBA吧,反正都一样的用法。运行下面的代码就能组成一个三段曲线的封闭图形了。原理一样,如果你希望节点坐标能通过函数生成,那你要自己研究函数了。
- Sub test()
- With ActiveWindow.Selection.SlideRange(1).Shapes.BuildFreeform(msoEditingCorner, 212, 424)
- .AddNodes msoSegmentCurve, msoEditingCorner, 123, 355, 245, 123, 358, 145
- .AddNodes msoSegmentCurve, msoEditingCorner, 472, 166, 919, 507, 895, 554
- .AddNodes msoSegmentCurve, msoEditingCorner, 871, 600, 302, 492, 212, 424
- .ConvertToShape
- End With
- End Sub
复制代码 |
|