Previous Document Next Document

Object Model Reference : Classes : C : Curve : Properties : Curve.Segments


Curve.Segments

Property Segments As Segments

Description

Member of Curve

The Segments property all the segments of all the subpaths in a curve.

The Segments property returns a read-only value.

VBA example

The following VBA example makes a selection of shapes in the active document and determines if the objects selected are shape objects. It converts all shapes in the selection to curves and changes the segment type for all of the subpath’s segments to linear.

Sub CurveSegments()
 Dim s As Shape
 Dim seg As Segment
 For Each s In ActiveSelection.Shapes
  If s.Type <> cdrCurveShape Then
   s.ConvertToCurves
  End If
  If s.Type = cdrCurveShape Then
   For Each seg In s.Curve.Segments
    seg.Type = cdrLineSegment
   Next seg
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.