Previous Document Next Document

Object Model Reference : Classes : P : PatternCanvas : Methods : PatternCanvas.PutCopy


PatternCanvas.PutCopy

Sub PutCopy(PatternCanvas As PatternCanvas)

Description

Member of PatternCanvas

The PutCopy method places the content of one pattern canvas into the active pattern canvas.

Parameter
Description
PatternCanvas
Specifies the pattern canvas to be copied

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.