Object Model Reference : Classes : S : Shape : Methods : Shape.Trim |
Function Trim(TargetShape As Shape, [LeaveSource As Boolean = True], [LeaveTarget As Boolean = False]) As Shape
Member of Shape
The Trim method trims a shape.
The following VBA example creates text embossed on a texturized surface.
Sub Test() |
Const Offset As Double = 0.05 |
Dim sBase As Shape, sLight As Shape, sDark As Shape |
Dim sRect As Shape |
Set sRect = ActiveLayer.CreateRectangle2(0.75, 4, 7, 3) |
Set sBase = ActiveLayer.CreateArtisticText(4.25, 4.75, "Bevel") |
With sBase.Text |
With .FontProperties |
.Name = "Arial" |
.Size = 150 |
.Style = cdrBoldFontStyle |
End With |
.AlignProperties.Alignment = cdrCenterAlignment |
End With |
Set sLight = sBase.Duplicate(-Offset, Offset) |
Set sLight = sBase.Trim(sLight) |
sLight.Fill.UniformColor.CMYKAssign 20, 0, 20, 0 |
Set sDark = sBase.Duplicate(Offset, -Offset) |
sDark.Fill.UniformColor.CMYKAssign 100, 0, 100, 80 |
sBase.Trim sDark, False, False |
sRect.Fill.ApplyTextureFill "Ivy on a Wall", "Samples 7" |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.