Previous Document Next Document
Segment.EndNode

Property EndNode As Node

Member of Segment

The EndNode property returns the ending node object of a segment.

The EndNode property returns a read-only value.

The following code example re-creates the selected curve by creating each segment as a separate shape:

Sub Test() 
 Dim seg As Segment 
 If ActiveShape Is Nothing Then Exit Sub 
 If ActiveShape.Type <> cdrCurveShape Then Exit Sub 
 For Each seg In ActiveShape.Curve.Segments 
  Select Case seg.Type 
   Case cdrLineSegment 
    ActiveLayer.CreateLineSegment seg.StartNode.PositionX, _ 
     seg.StartNode.PositionY, _ 
     seg.EndNode.PositionX, seg.EndNode.PositionY 
   Case cdrCurveSegment 
    ActiveLayer.CreateCurveSegment seg.StartNode.PositionX, _ 
     seg.StartNode.PositionY, _ 
     seg.EndNode.PositionX, seg.EndNode.PositionY, _ 
     seg.StartingControlPointLength, _ 
     seg.StartingControlPointAngle, _ 
     seg.EndingControlPointLength, _ 
     seg.EndingControlPointAngle 
  End Select 
 Next seg 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.