Previous Document Next Document
EffectEnvelope.CopyFrom

Sub CopyFrom(Source As EffectEnvelope)

Member of EffectEnvelope

The CopyFrom method copies the properties from one envelope effect to another.

If you’ve applied an effect to the object since you applied the envelope, you won’t be able to copy the envelope.

Parameters
Description
Source
Specifies an envelope effect from which to copy its properties

The following code example creates a text object and applies an envelope effect to it. It then creates a group of rectangles and applies an envelope to them, using the same parameters as the text’s envelope.

Sub Test() 
 Dim s1 As Shape, s2 As Shape, eff As Effect 
 Set s1 = ActiveLayer.CreateArtisticText(2.75, 5, "Text") 
 With s1.Text.FontProperties 
  .Name = "Arial Black" 
  .Size = 150 
 End With 
 Set eff = s1.CreateEnvelope(3, cdrEnvelopePutty, True) 
 Set s2 = ActiveLayer.CreateGridBoxes(0, 0, 3, 3, 8, 8) 
 s2.CreateEnvelope(1).Envelope.CopyFrom eff.Envelope 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.