Object Model Reference : Classes : S : SubPath : Methods : SubPath.ReverseDirection |
Sub ReverseDirection()
Member of SubPath
The ReverseDirection method reverses the direction of a subpath without affecting other subpaths in the curve. This is accomplished by reversing the order of the index numbers associated with the nodes.
The following VBA example creates a curve object containing 10 subpaths. It applies end arrowheads to them and then reverses the direction of the third subpath.
Sub Test() |
Dim sr As New ShapeRange |
Dim s As Shape |
Dim n As Long |
For n = 1 To 10 |
sr.Add ActiveLayer.CreateLineSegment(0, n / 2, 5, n / 2) |
Next n |
Set s = sr.Combine |
s.Outline.EndArrow = ArrowHeads(2) |
s.Curve.Subpaths(3).ReverseDirection |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.