Previous Document Next Document

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


PatternCanvas.PSet

Sub PSet(Step As Integer, x As Long, y As Long, Color As Boolean)

Description

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.

Parameter
Description
Step
Specifies the number of bands (or steps)
x
Specifies the horizontal position of the point on the pattern canvas. This value is measured in document units.
y
Specifies the vertical position of the point on the pattern canvas. This value is measured in document units.
Color
Indicates whether the pixel has a color applied to it on the pattern canvas. If this value is set to True, the selected color in the active color palette is applied to the pixel.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.