Previous Document Next Document
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 the segment that contains the specified point on the subpath.

Optionally, it returns the offset of the specified point within the returned segment.

Parameters
Description
Offset
Specifies the offset, in document units, of the point
This parameter is optional, and its default value is 0.5.
OffsetType
Specifies the type of offset. This parameter returns cdrSegmentOffsetType.
This parameter is optional, and its default value is cdrRelativeSegmentOffset (1).
SegmentOffset
Returns the offset f a segment in the subpath
This parameter is optional, and its default value is 0.

The following code example converts the segment that is in the middle of the subpath to a line:

Sub Test() 
 Dim seg As Segment 
 Set seg = ActiveShape.Curve.Subpaths(1).GetSegmentAt(0.5, 
cdrRelativeSegmentOffset) 
 seg.Type = cdrLineSegment 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.