API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.AppendCurveSegment method
Appends a new curve segment to this subpath
Syntax:
Function AppendCurveSegment(ByVal x As Double, ByVal y As Double, Optional ByVal StartingControlPointLength As Double = -1, Optional ByVal StartingControlPointAngle As Double = 0, Optional ByVal EndingControlPointLength As Double = -1, Optional ByVal EndingControlPointAngle As Double = 0, Optional ByVal AppendAtBeginning As Boolean = False) As Segment
Parameters:
Name Type Description
x
Double
y
Double
StartingControlPointLength
Double
Specifies, in document units, the distance from the node that lies between the new appended curve segment and the existing curve's subpath.
StartingControlPointAngle
Double
Specifies the angle, measured in degrees, of the starting control point.
EndingControlPointLength
Double
Specifies, in document units, the distance from the node that lies between the new appended curve segment and the existing curve's subpath.
EndingControlPointAngle
Double
Specifies the angle, measured in degrees, of the ending control point.
AppendAtBeginning
Boolean
Specifies whether the new line segment joins the subpath at the head of the subpath.
Remarks:
The AppendCurveSegment method joins a new curve segment to the beginning or the end of a subpath.
Examples:
The following VBA example creates a closed curve and applies a fountain fill to it.
Sub Test()
Dim s As Shape
Dim crv As Curve
Dim sp As SubPath
Dim c As New Color
Set crv = CreateCurve(ActiveDocument)
Set sp = crv.CreateSubPath(0, 0)
sp.AppendLineSegment 3.6, 0, False
sp.AppendCurveSegment 3.6, 0.8, 0.43, 160, 0.43, -160, False
sp.AppendLineSegment 0, 0.8, False
sp.AppendCurveSegment 0, 0, 0.43, -20, 0.43, 20, False
sp.Closed = True
Set s = ActiveLayer.CreateCurve(crv)
c.CMYKAssign 0, 0, 0, 100
With s.Fill.ApplyFountainFill(c, c, , 90, , , , cdrCustomFountainFillBlend).Colors
  .Add CreateCMYKColor(0, 0, 0, 0), 70
End With 
End Sub