Object Model Reference : Classes : P : PatternCanvas : Methods : PatternCanvas.Line |
Sub Line(Flags As Integer, x1 As Long, y1 As Long, x2 As Long, y2 As Long, Color As Boolean)
Member of PatternCanvas
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.
|
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.