API Documentation > CorelDRAW > 2025-v26 > Segment > IVGSegment
Segment.GetBendPoints method
Gets bend points
Syntax:
Function GetBendPoints(ByRef Offset1 As Double, ByRef Offset2 As Double, Optional ByVal OffsetType As cdrSegmentOffsetType = cdrParamSegmentOffset) As Long
Parameters:
Name Type Description
Offset1
Double
Offset2
Double
OffsetType
Specifies the type of offset of the point on the curve's subpath, and returns cdrSegmentOffsetType.
Remarks:
The GetBendPoints method returns the number of bend points in a curve segment. A bend point is the offset where a curve segment bends (that is, where it changes its curvature from positive to negative). There can be a maximum of two bend points per segment, and possibly none.
Examples:
The following VBA example marks, with small circles, all bend points in the selected curve.
Sub Test()
Dim seg As Segment
Dim t1 As Double, t2 As Double, n As Long
For Each seg In ActiveShape.Curve.Segments
  n = seg.GetBendPoints(t1, t2)
  If n > 1 Then MarkPoint seg, t2

 If n > 0 Then MarkPoint seg, t1

 Next seg
  
End Sub
  Private Sub MarkPoint(seg As Segment, t As Double)

 Dim x As Double, y As Double

 Dim s As Shape

 seg.GetPointPositionAt x, y, t

 Set s = ActiveLayer.CreateEllipse2(x, y, 0.03)

 s.Fill.UniformColor.RGBAssign 255, 255, 0
  
End Sub