Object Model Reference : Classes : P : PatternCanvas : Methods : PatternCanvas.PSet |
Sub PSet(Step As Integer, x As Long, y As Long, Color As Boolean)
Member of PatternCanvas
The PSet method sets a pixel of a given color at a specified coordinate on a pattern canvas. If this property is set to True, the pixel represents white. If it is set to False, the pixel represents black.
• |
See also the PatternCanvas.Pixel property.
|
• |
For detailed descriptions of the parameters for this function, see the
Visual Basic Help.
|
The following VBA example creates a pattern consisting of a diagonal line, an unfilled rectangle, and two pixels in the upper-right and lower-left corners of the canvas.
Sub Test() |
Dim c As New PatternCanvas |
c.Size = cdrPatternCanvas32x32 |
c.Clear |
c.Line (0, 0)-(31, 31) |
c.Line (5, 5)-(27, 27), , B |
c.PSet (30, 2) |
c.PSet (2, 30) |
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.