![]() |
![]() |
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 located on a curves subpath.
Parameters
|
Description
|
x
|
Specifies the horizontal position of a point on a curves subpath. The x-coordinate is measured in document units.
|
y
|
Specifies the vertical position of a point on a curves subpath. The y-coordinate is measured in document units.
|
Offset
|
Specifies the offset distance, in document units, of a point on a curves subpath
This parameter is optional,
and its default value is 0.5. |
OffsetType
|
Specifies the type of offset of a point on a curves subpath. This parameter returns cdrSegmentOffsetType.
This parameter is optional, and its default value is cdrRelativeSegmentOffset (1).
|
The following code 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 t, cdrRelativeSegmentOffset, x, y ActiveLayer.CreateEllipse2 x, y, 0.03 Next t Next sp End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.