Object Model Reference : Classes : P : PatternCanvas : Methods : PatternCanvas.PutCopy |
Sub PutCopy(PatternCanvas As PatternCanvas)
Member of PatternCanvas
The PutCopy method places the content of one pattern canvas into the active pattern canvas.
The following VBA example creates a new pattern based on the first available fill pattern in the PatternCanvases collection. The new pattern contains a small white rectangle at its center.
Sub Test() |
Dim c As New PatternCanvas |
Dim x As Long, y As Long |
c.PutCopy PatternCanvases(1) |
x = c.Width / 2 |
y = c.Height / 2 |
c.FillArea x - 10, y - 10, x + 10, y + 10, True |
With ActiveLayer.CreateRectangle(0, 0, 2, 2) |
.Fill.ApplyPatternFill cdrTwoColorPattern |
.Fill.Pattern.Canvas = c |
End With |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.