In general, a line can consist of any number of
segments connected end to end, and each segment can be
straight or curved. To create a canvas line object on a
canvas
,
use:C
id
=C
.create_line (x0
,y0
,x1
,y1
, ...,xn
,yn
,option
, ... )
The line goes through the series of points
(
,
x0
),
(y0
,
x1
),
…
(y1
,
xn
).
Options include:yn
arrow | The default is for the line to have no
arrowheads. Use
arrow=FIRST to get an
arrowhead at the
( ,
)
end of the line. Use
arrow=LAST to get an
arrowhead at the far end. Use
arrow=BOTH for arrowheads
at both ends. |
arrowshape | A tuple
( that
describes the shape of the arrowheads added by
the arrow option. Default
is (8,10,3) .
|
fill | The color to
use in drawing the line. Default is
fill="black" . |
smooth | If true, the line is drawn as a series of parabolic splines fitting the point set. Default is false, which renders the line as a set of straight segments. |
splinesteps | If the smooth option
is true, each spline is rendered as a number of
straight line segments. The
splinesteps option
specifies the number of segments used to
approximate each section of the line; the default
is splinesteps=12 . |
stipple | To draw a stippled line, set this option to
a bitmap that specifies the stippling pattern,
such as stipple="gray25" .
See Section 4.7, “Bitmaps” for the possible
values. |
tags | The tags to be associated with the object, as a sequence of strings. See Section 6.1.4, “Canvas tags”. |
width | The line's width. Default is 1 pixel. See Section 4.1, “Dimensions” for possible values. |