Previous Document Next Document

Object Model Reference : Classes : S : SubPath : Methods : SubPath.FindSegmentOffset


SubPath.FindSegmentOffset

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

Description

Member of SubPath

The FindSegmentOffset method finds the offset of a specified point on a segment subpath.

 
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.

Parameter
Description
AbsoluteOffset
Specifies the value of the absolute offset
Segment
Specifies the segment
ParamOffset
Specifies the value of the parametric offset for the subpath
Remainder
Specifies the value of the remainder. This parameter is optional, and its default value is 0.

VBA example

The following VBA example finds the segment that contains a point 3" 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 2013 Corel Corporation. All rights reserved.