我在word的宏里写了一段代码,执行后画了一条拐弯的线,可我不知道代码中的7个点是怎么控制线的,请大家帮忙,代码如下:
Dim pts(1 To 7, 1 To 2) As Single
pts(1, 1) = 0
pts(1, 2) = 0
pts(2, 1) = 0
pts(2, 2) = 0
pts(3, 1) = 100
pts(3, 2) = 100
pts(4, 1) = 0
pts(4, 2) = 0
pts(5, 1) = 90
pts(5, 2) = 120
pts(6, 1) = 60
pts(6, 2) = 30
pts(7, 1) = 150
pts(7, 2) = 90ActiveDocument.Shapes.AddCurve ptsEnd Sub
Dim pts(1 To 7, 1 To 2) As Single
pts(1, 1) = 0
pts(1, 2) = 0
pts(2, 1) = 0
pts(2, 2) = 0
pts(3, 1) = 100
pts(3, 2) = 100
pts(4, 1) = 0
pts(4, 2) = 0
pts(5, 1) = 90
pts(5, 2) = 120
pts(6, 1) = 60
pts(6, 2) = 30
pts(7, 1) = 150
pts(7, 2) = 90ActiveDocument.Shapes.AddCurve ptsEnd Sub
解决方案 »
- WINSOCK,苦恼了我1年半的问题
- 有个问题,怎么用FindWindow函数获得qq游戏里面比如说斗地主窗口的啊,我用spy++得不到这个窗口的类啊?怎么得到?有方法吗
- VB控件效果怎么实现???????请教各位!!!!!!!!!!!!!!!
- 挑战!要写个DLL,它能读取网页并返回网页源文件
- 怎样实现图像的平滑放大?
- 为什么我用不了sstab(属性页控件)
- 很奇怪的问题,请教自定义控件高手。
- 怎么知道在一段时间内没有任何的鼠标和键盘操作?那位高人知道啊?
- 救急!vb6.0 + FoxPro 数据库生成的程序在他人的电脑上打开出错!
- 大家对赵薇被打怎么看?
- 如何让在无边框窗体上实现菜单栏?
- 如何让我的FORM置于WINDOWS屏幕的顶端
expression Required. An expression that returns a Shapes object.SafeArrayOfPoints Required Variant. An array of coordinate pairs that specifies the vertices and control points of the curve. The first point you specify is the starting vertex, and the next two points are control points for the first Bézier segment. Then, for each additional segment of the curve, you specify a vertex and two control points. The last point you specify is the ending vertex for the curve. Note that you must always specify 3n + 1 points, where n is the number of segments in the curve.至于那个线(Bézier Curve)怎么画出来的,控制点怎么设,在网上找找就好了。比如我看了这个网页就有了个大致的概念:http://www.moshplant.com/direct-or/bezier/。 不过有问题别问我啊,我也是现炒现卖,:-)