Previous Document Next Document
ShapeRange.OrderBackOf

Sub OrderBackOf(Shape As Shape)

Member of ShapeRange

The OrderBackOf method moves all of the shapes in the range. The shapes are moved behind the specified shape in the stacking order of the current layer.

Parameters
Description
Shape
Specifies the Shape object behind which another shape is placed

The following code example creates a set of circles behind the outline of the selected curve:

Sub Test() 
 Dim s As Shape, sr As New ShapeRange 
 Dim crv As Shape, sp As SubPath, lr As Layer 
 Dim x As Double, y As Double, i As Long 
 Set crv = ActiveShape 
 If crv.Type <> cdrCurveShape Then 
  MsgBox "Please select a curve" 
  Exit Sub 
 End If 
 Set sp = crv.Curve.Subpaths(1) 
 Set lr = crv.Layer 
 For i = 0 To 10 
  sp.GetPointPositionAt i / 10, cdrRelativeSegmentOffset, x, y 
  Set s = lr.CreateEllipse2(x, y, 0.3) 
  s.Fill.UniformColor.RGBAssign 255, 255, 0 
  sr.Add s 
 Next i 
 sr.OrderBackOf crv 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.