![]() |
![]() |
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 Visual Basic Help for detailed descriptions of parameters for this function.
See also the FillArea method.
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.