![]() |
![]() |
Segment.GetCurveSpeedAt
Function GetCurveSpeedAt([Offset As Double = 0.5], [OffsetType As cdrSegmentOffsetType = cdrParamSegmentOffset]) As Double
Member of Segment
The GetCurveSpeedAt method returns a value that indicates how fast the curvature changes at a specified point.
A value close to 0 means that the curvature is steady for example, in a circle. If it is greater than 0, the curvature increases for example, in a spiral. A value of less than 0 value indicates that the curvature decreases for example, in an unwinding spiral.
Parameters
|
Description
|
Offset
|
Specifies the offset, in document units, of a point on a segments subpath.
This parameter is optional, and its default value is 0.5.
|
OffsetType
|
Specifies the type of the offset
This parameter is optional, and its default value is cdrParamSegmentOffset (2).
|
The following code example displays how fast the curvature changes in the middle of the first segment of the selected curve:
Sub Test() Dim c As Double Dim seg As Segment Set seg = ActiveShape.Curve.Segments(1) c = seg.GetCurveSpeedAt(0.5, cdrRelativeSegmentOffset) If Abs(c) < 0.01 Then MsgBox "Curvature is steady: " & c Else If c > 0 Then MsgBox "Curvature is increasing: " & c Else MsgBox "Curvature is decreasing: " & c End If End If End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.