Object Model Reference : Classes : S : SubPath : Methods : SubPath.GetSegmentAt |
Function GetSegmentAt([Offset As Double = 0.5], [OffsetType As cdrSegmentOffsetType = cdrRelativeSegmentOffset], [SegmentOffset As Double]) As Segment
Member of SubPath
The GetSegmentAt method returns a segment that contains the specified point on a subpath. Optionally, it returns the offset of the specified point within the returned segment.
Parameter
|
Description
|
Offset
|
Specifies, in document units, the offset of the point. This parameter is optional, and its default value is 0.5.
|
OffsetType
|
Specifies the offset type, and returns cdrSegmentOffsetType. This parameter is optional, and its default value is cdrRelativeSegmentOffset (1).
|
SegmentOffset
|
Specifies the offset of the subpath segment. This parameter is optional, and its default value is 0.
|
The following VBA example converts, to a line, the segment that is in the middle of the subpath.
Sub Test() |
Dim seg As Segment |
Set seg = ActiveShape.Curve.Subpaths(1).GetSegmentAt(0.5, cdrRelativeSegmentOffset) |
seg.Type = cdrLineSegment |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.