Previous Document Next Document

Object Model Reference : Classes : S : SubPath : Methods : SubPath.AppendCurveSegment2


SubPath.AppendCurveSegment2

Function AppendCurveSegment2(x As Double, y As Double, StartingControlPointX As Double, StartingControlPointY As Double, EndingControlPointX As Double, EndingControlPointY As Double, [AppendAtBeginning As Boolean = False]) As Segment

Description

Member of SubPath

The AppendCurveSegment2 method appends a new curve segment to a subpath.

Parameter
Description
x
Specifies, in document units, the horizontal position of the new line segment to append to the subpath
y
Specifies, in document units, the vertical position of the new line segment to append to the subpath
StartingControlPointX
Specifies the horizontal position of the starting control point
StartingControlPointY
Specifies the vertical position of the starting control point
EndingControlPointX
Specifies the horizontal position of the ending control point
EndingControlPointY
Specifies the vertical position of the ending control point
AppendAtBeginning
Specifies whether the new line segment joins the subpath at the head of the subpath. This parameter is optional, and its default value is False.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.