Previous Document Next Document
SubPath.AppendCurveSegment

Function AppendCurveSegment(x As Double, y As Double, [StartingControlPointLength As Double = -1], [StartingControlPointAngle As Double], [EndingControlPointLength As Double = -1], [EndingControlPointAngle As Double], [AppendAtBeginning As Boolean = False]) As Segment

Member of SubPath

The AppendCurveSegment method joins a new curve segment to the beginning or the end of a subpath.

Parameters
Description
x
Specifies the horizontal position of the new line segment that is appended to the subpath object. The x-coordinate is measured in document units.
y
Specifies the vertical position of the new line segment that is appended to the subpath object. The y-coordinate is measured in document units.
StartingControlPointLength
Specifies the distance from the node that lies between the new appended curve segment and the existing curve’s subpath object. The length is measured in document units.
This parameter is optional, and its default value is -1.
StartingControlPointAngle
Specifies the angle, measured in degrees, of the starting control point
This parameter is optional, and its default value is 0.
EndingControlPointLength
Specifies the distance from the node that lies between the new appended curve segment and the existing curve’s subpath object. The length is measured in document units.
This parameter is optional, and its default value is -1.
EndingControlPointAngle
Specifies the angle, measured in degrees, of the ending control point
This parameter is optional, and its default value is 0.
AppendAtBeginning
Specifies whether the new line segment joins the subpath at the head of the subpath object
This parameter is optional, and its default value is False.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.