Previous Document Next Document
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.

Parameters
Description
PatternCanvas
Specifies the pattern canvas to be copied

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.