![]() |
![]() |
SubPath.Index
Property Index As Long
Member of SubPath
The Index property returns the index number of a curves subpath.
The Index property returns a read-only value.
The following code example place a number next to each subpath:
Sub Test() Dim spath As SubPath Dim x As Double, y As Double, a As Double Dim s As Shape For Each spath In ActiveShape.Curve.Subpaths spath.GetPointPositionAt 0.5, cdrRelativeSegmentOffset, x, y a = spath.GetPerpendicularAt(0.5, cdrRelativeSegmentOffset) If a < 0 Or a > 180 Then a = a + 180 a = a * 3.1415926 / 180 x = x + 0.2 * Cos(a) y = y + 0.2 * Sin(a) Set s = ActiveLayer.CreateArtisticText(x, y, CStr(spath.Index)) With s.Text .AlignProperties.Alignment = cdrCenterAlignment .FontProperties.Name = "Arial" .FontProperties.Size = 18 End With Next spath End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.