![]() |
![]() |
Curve.CreateSubPath
Function CreateSubPath(x As Double, y As Double) As SubPath
Member of Curve
The CreateSubPath method creates a subpath for a curve. The CreateSubPath method requires x- and y-coordinates to represent the first node in the subpath.
Parameters
|
Description
|
x
|
Specifies the horizontal position for the first node in a curve objects new subpath
|
y
|
Specifies the vertical position for the first node in a curve objects new subpath
|
The following code example creates a curve with two line segments and three curve segments within the subpath.
Sub Test() Dim s As Shape Dim sp As SubPath Dim crv As Curve Set crv = CreateCurve(ActiveDocument) ActiveDocument.ReferencePoint = cdrBottomLeft Set sp = crv.CreateSubPath(1, 1) sp.AppendLineSegment 1, 1 sp.AppendCurveSegment 3, 3 sp.AppendCurveSegment 5, 1 sp.AppendCurveSegment 7, 4 sp.AppendLineSegment 9, 0 sp.Nodes(2).Type = cdrSmoothNode sp.Nodes(3).Type = cdrSmoothNode sp.Nodes(4).Type = cdrSmoothNode sp.Nodes(5).Type = cdrSmoothNode Set s = ActiveLayer.CreateCurve(crv) End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.