Previous Document Next Document
Layer.CreateCurveSegment2

Function CreateCurveSegment2(x1 As Double, y1 As Double, StartingControlPointX As Double, StartingControlPointY As Double, EndingControlPointX As Double, EndingControlPointY As Double, x2 As Double, y2 As Double) As Shape

Member of Layer

The CreateCurveSegment2 method creates a curve segment using specified control-point coordinates.

Parameters
Description
x1
Specifies the x-coordinate for the starting point of the curve segment. This value is measured in document units.
y1
Specifies the y-coordinate for the starting point of the curve segment. This value is measured in document units.
StartingControlPointX
Specifies the x-coordinate for the starting control point
StartingControlPointY
Specifies the y-coordinate for the starting control point
EndingControlPointX
Specifies the x-coordinate for the ending control point
EndingControlPointY
Specifies the y-coordinate for the ending control point
x2
Specifies the x-coordinate for the ending point of the curve segment. This value is measured in document units.
y2
Specifies the y-coordinate for the ending point of the curve segment. This value is measured in document units.

The following code example creates a curve and adds text along the curve:

Sub Test() 
 Dim sText As Shape, sPath As Shape 
 Set sText = ActiveLayer.CreateArtisticText(0, 0, "Some Text") 
 Set sPath = ActiveLayer.CreateCurveSegment2(0.6, 4.5, 0, 3, 5.2, 
8.2, 5.3, 7) 
 sText.Text.FitToPath sPath 
 sText.Effects(1).TextOnPath.Placement = cdrCenterPlacement 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.