Previous Document Next Document
SubPath.FindSegmentOffset

Function FindSegmentOffset(AbsoluteOffset As Double, Segment As Segment, ParamOffset As Double, [Remainder As Double]) As Boolean

Member of SubPath

The FindSegmentOffset method finds a segment, as well as the offset for a specified point on a subpath belonging to the segment.

If the offset is longer than the length of the subpath, the function returns False, and the remaining offset is returned in the Remainder parameter. Otherwise, the function returns True, and the ParamOffset parameter returns the parametric offset for the subpath.

Parameters
Description
AbsoluteOffset
Lets you specify the absolute offset value
Segment
Identifies the segment
ParamOffset
Specifies the parametric offset value
Remainder
Returns the value of the remainder
This parameter is optional, and its default value is 0.

The following code example finds the segment that contains a point 3 inches from the beginning of the first subpath, and it then converts the segment to a line:

Sub Test() 
 Dim seg As Segment 
 Dim t As Double 
 If ActiveShape.Curve.Subpaths(1).FindSegmentOffset(3, seg, t) Then 
  seg.Type = cdrLineSegment 
 Else 
  MsgBox "The first subpath is less than 3"" long." 
 End If 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.