Object Model Reference : Classes : L : Layer : Methods : 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 uses specified control-point coordinates to create a curve segment at a specified location on a layer.
The following VBA 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 |
Copyright 2013 Corel Corporation. All rights reserved.