Previous Document Next Document
Segment.Next

Function Next() As Segment

Member of Segment

The Next method returns the next segment on the same subpath.

If the last segment is reached and the subpath is not closed, Nothing is returned

The following code example creates a triangle, converts the three segments to curves, and changes the type of the bottom nodes to smooth, producing a shape resembling a droplet:

Sub Test()

 Dim s As Shape 
 Dim seg As Segment 
 Set s = ActiveLayer.CreatePolygon(3, 6, 7, 2, 3) 
 s.ConvertToCurves 
 s.Curve.Nodes.Range(2, 4, 6).Delete 
 Set seg = s.Curve.Segments(2) 
 seg.Previous.Type = cdrCurveSegment 
 seg.Next.Type = cdrCurveSegment 
 seg.Type = cdrCurveSegment 
 seg.StartNode.Type = cdrSmoothNode 
 seg.EndNode.Type = cdrSmoothNode 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.