![]() |
![]() |
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 set to True, the pixel represents white. If set to False, the pixel represents black.
See also the Visual Basic Help for detailed descriptions of parameters for this function.
See also the Pixel property.
The following code 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 2007 Corel Corporation. All rights reserved.