Object Model Reference : Classes : S : SubPath : Methods : SubPath.GetPointPositionAt |
Sub GetPointPositionAt(x As Double, y As Double, [Offset As Double = 0.5], [OffsetType As cdrSegmentOffsetType = cdrRelativeSegmentOffset])
Member of SubPath
The GetPointPositionAt method returns the coordinates of a point on a curves subpath.
Parameter
|
Description
|
x
|
Specifies, in document units, the horizontal position of the point
|
y
|
Specifies, in document units, the vertical position of the point
|
Offset
|
Specifies, in document units, the offset distanceof the point
|
OffsetType
|
Specifies, in document units, the offset type of the point, and returns cdrSegmentOffsetType. This parameter is optional, and its default value is cdrRelativeSegmentOffset (1).
|
The following VBA example creates five small ellipses distributed evenly along each subpath of the selected curve.
Sub Test() |
Dim sp As SubPath |
Dim t As Double, x As Double, y As Double |
For Each sp In ActiveShape.Curve.SubPaths |
For t = 0 To 0.9 Step 0.1 |
sp.GetPointPositionAt x, y, t, cdrRelativeSegmentOffset |
ActiveLayer.CreateEllipse2 x, y, 0.03 |
Next t |
Next sp |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.