API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.AppendCurveSegment2 method
Appends a new curve segment to this subpath
Syntax:
Function AppendCurveSegment2(ByVal x As Double, ByVal y As Double, ByVal StartingControlPointX As Double, ByVal StartingControlPointY As Double, ByVal EndingControlPointX As Double, ByVal EndingControlPointY As Double, Optional ByVal AppendAtBeginning As Boolean = False) As Segment
Parameters:
Name Type Description
x
Double
y
Double
StartingControlPointX
Double
StartingControlPointY
Double
EndingControlPointX
Double
EndingControlPointY
Double
AppendAtBeginning
Boolean
Specifies whether the new line segment joins the subpath at the head of the subpath.
Remarks:
The AppendCurveSegment2 method appends a new curve segment to 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.AppendCurveSegment2 3.6, 0.8, 4.6, 3.1, 5.43, -1.6, False
sp.AppendLineSegment 0, 0.8, False
sp.AppendCurveSegment2 5, 4.8, 5, -2, 2, -5, 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