Previous Document Next Document
Layer.CreateCurveSegment

Function CreateCurveSegment(StartX As Double, StartY As Double, EndX As Double, EndY As Double, [StartingControlPointLength As Double = -1], [StartingControlPointAngle As Double], [EndingControlPointLength As Double = -1], [EndingControlPointAngle As Double]) As Shape

Member of Layer

The CreateCurveSegment method creates a single curve.

Parameters
Description
StartX
Specifies the x-coordinate for the starting point of the curve segment. This value is measured in document units.
StartY
Specifies the y-coordinate for the starting point of the curve segment. This value is measured in document units.
EndX
Specifies the x-coordinate for the ending point of the curve segment. This value is measured in document units.
EndY
Specifies the y-coordinate for the ending point of the curve segment. This value is measured in document units.
StartingControlPointLength
Specifies the length of the starting control point. 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
This parameter is optional, and its default value is 0.
EndingControlPointLength
Specifies the length of the ending control point. 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.

The following code example creates a curve segment on the active layer. The starting point of the curve is (3, 3), and the ending point is (6, 6). The length of the starting and ending control points is 5, and the starting and ending angles of the control points are 45?

Sub CurveCreate() 
 ActiveLayer.CreateCurveSegment(3, 3, 6, 6, 5, 45, 5, 45) 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.