Control Reference > VSPrinter Control > VSPrinter Methods > DrawLine Method (VSPrinter) |
Draws a line segment.
[form!]VSPrinter.DrawLine X1 As Variant, Y1 As Variant, [ X2 As Variant ], [ Y2 As Variant ]
The DrawLine method draws a line between point (X1, Y1) and (X2, Y2). If (X2, Y2) are omitted, the line is drawn from the last point used in a call to DrawLine and (X1, Y1).
Lines are drawn with the current pen, defined by the PenColor, PenStyle, and PenWidth properties.
The X1, Y1, X2, and Y2 parameters may be specified with units (inches, points, twips, cm, mm, or pixels). The default unit is twips. For details on using unit-aware measurements, see the Using Unit-Aware Properties topic.
To draw complex shapes, you may prefer to use the Polygon or PolyLine properties instead.