(Obsolete)
Description: This statement draws a line on the screen that may consist of multiple segments.
Returns: Numeric
Usage: Steady State.
Format: Line(Style, Width, Color, Curvature, X1, Y1, X2, Y2, ...)
Parameters: Style { numeric } { required } { no default }
Any numeric expression giving the line style. Valid line styles are from 1 to 5 inclusive. A line style of 1 is a solid line. See Chapter 9 for more styles.
Width { numeric } { required } { no default }
Any numeric expression giving the width of the line in units of X screen coordinates. The width is always rounded to result in an odd number of pixels on the screen. The minimum width displayed will be 1 pixel.
Color { numeric } { required } { no default }
Any numeric expression giving the color of the line.
Curvature { numeric } { required } { no default }
Any numeric expression giving the radius of curvature of the corners for the line. This is specified in units of X screen coordinates. If the number of endpoints is 2, Curvature is ignored.
X1, Y1, X2, Y2, ... { numeric } { required } { no default }
Any numeric expressions giving the screen coordinates of the line endpoints.
Comments: This statement has been superseded by the GUIPolygon and ZLine statements and is maintained for backwards compatibility only.
The Line statement is non-destructive only when the number of endpoints is 2. The radius of curvature of the line corners is the radius of the arc that joins the line endpoints. A Curvature of 0 results in sharp (square) line corners. Larger Curvature numbers result in greater rounding of the line corners.
Example:
Line(1 { Solid line style },
1 { Line width is 1 pixel },
10 { Light green },
0 { Curvature not applicable (2 endpoints) },
0, 0 { Coordinates of first end },
XLoc(), YLoc() { Second end follows mouse });
This statement will draw a light green solid line with one end anchored at (0, 0) and the second end following the movements of the mouse.
See Also: