Previous Document Next Document

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


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

Description

Member of Layer

The CreateCurveSegment method creates a single curve at a specified location on a layer.

Parameter
Description
StartX
Specifies, in document units, the x-coordinate for the starting point of the curve segment
StartY
Specifies, in document units, the y-coordinate for the starting point of the curve segment
EndX
Specifies, in document units, the x-coordinate for the ending point of the curve segment
EndY
Specifies, in document units, the y-coordinate for the ending point of the curve segment
StartingControlPointLength
Specifies, in document units, the length of the starting control point. 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, in document units, the length of the ending control point. 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.

VBA example

The following VBA 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 2013 Corel Corporation. All rights reserved.