Previous Document Next Document

Object Model Reference : Classes : L : Layer : Methods : Layer.CreateCurveSegment2


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

Description

Member of Layer

The CreateCurveSegment2 method uses specified control-point coordinates to create a curve segment at a specified location on a layer.

Parameter
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.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.