Draw a line
Syntax:
Sub Line(ByVal Flags As Integer, ByVal x1 As Long, ByVal y1 As Long, ByVal x2 As Long, ByVal y2 As Long, ByVal Color As Boolean)
Parameters:
Name Type Description
Flags
Integer
x1
Long
y1
Long
x2
Long
y2
Long
Color
Boolean
Remarks:
The Line method draws a line, or a rectangle that is either filled or unfilled. See also the PatternCanvas.FillArea method. For detailed descriptions of the parameters for this function, see the Visual Basic Help.
Examples:
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