Object Model Reference : Classes : P : PatternCanvas : Properties : PatternCanvas.Size |
Property Size As cdrPatternCanvasSize
Member of PatternCanvas
The Size property returns or specifies one of the standard canvas sizes (16 × 16, 32 × 32, or 64 × 64 pixels). Any other sizes are treated as custom sizes.
• |
The Size property returns a value of cdrPatternCanvasSize.
The following VBA example creates a new pattern canvas that is 64 × 64 pixels and then applies it to a rectangle.
Sub Test() |
Dim c As New PatternCanvas |
Dim x As Long, y As Long |
c.Size = cdrPatternCanvas64x64 |
c.Clear |
For x = 0 To c.Width - 1 |
For y = 0 To c.Height - 1 |
c.Pixel(x, y) = (((x + y) \ 2) Mod 2) <> 0 |
Next y |
Next x |
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.