Previous Document Next Document
SegmentRange.AddRange

Sub AddRange(SegmentRange As SegmentRange)

Member of SegmentRange

The AddRange method adds segments from a specified range to the active range. (It combines the two ranges.)

Parameters
Description
SegmentRange
Specifies the range of segment items that are added to the active segment range

The following code example creates a text object containing the letter B and converts it to curves. Then it creates a range containing the segments from the second and third subpaths (that is, the inner “holes” in the letter B), and converts the segments to lines.

Sub Test() 
 Dim s As Shape 
 Dim sgr As SegmentRange 
 Set s = ActiveLayer.CreateArtisticText(0, 0, "B") 
 With s.Text.FontProperties 
  .Name = "Arial Black" 
  .Size = 72 
 End With 
 s.ConvertToCurves 
 Set sgr = s.Curve.Subpaths(2).Segments.All 
 sgr.AddRange s.Curve.Subpaths(3).Segments.All 
 sgr.SetType cdrLineSegment 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.