Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.AddToPowerClip


ShapeRange.AddToPowerClip

Sub AddToPowerClip(Shape As Shape, [CenterInContainer As cdrTriState = cdrUndefined])

Description

Member of ShapeRange

The AddToPowerClip method adds a shape range to a specified PowerClip container.

Parameter
Description
Shape
Specifies the shape range to add
CenterInContainer
Specifies whether to center the shape range in the PowerClip container. This parameter is optional, and its default value is cdrUndefined (-2).

VBA example

The following VBA example places 150 randomly-sized and randomly-colored circles inside a text object.

Sub Test()
 Dim sr As New ShapeRange
 Dim s As Shape, n As Long
 For n = 1 To 150
  Set s = ActiveLayer.CreateEllipse2(Rnd() * 4, Rnd() * 2, Rnd() * 0.3)
  s.Fill.UniformColor.RGBAssign Rnd() * 256, Rnd() * 256, Rnd() * 256
  sr.Add s
 Next n
 Set s = ActiveLayer.CreateArtisticText(0, 0, "Clip")
 With s.Text.FontProperties
  .Name = "Arial Black"
  .Size = 150
 End With
 sr.AddToPowerClip s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.