An arc object on a canvas, in its most general form, is a wedge-shaped slice taken out of an ellipse. This includes whole ellipses and circles as special cases. See Section 6.7, “The canvas oval object” for more on the geometry of the ellipse drawn.
To create an arc object on a canvas
,
use:C
id
= C.create_arc (x0
,y0
,x1
,y1
,option
, ... )
The constructor returns the object ID of the new arc
object on canvas
.C
Point
(
,
x0
) is
the top left corner and
(y0
,
x1
)
the lower right corner of a rectangle into which the
ellipse is fit. If this rectangle is square, you get a
circle.y1
The various options include:
extent | Width of the slice in degrees. The slice
starts at the angle given by the
option and extends counterclockwise for
degrees. |
fill | By default, the interior of an arc is
transparent, and fill=""
will select this behavior. You can also set this
option to any color
and the interior of the arc will be filled with
that color. |
outline | The color of the border around the outside of the slice. Default is black. |
outlinestipple | If the outline option
is used, this option specifies a bitmap used to
stipple the border. Default is black, and that
default can be specified by setting
outlinestipple="" . |
start | Starting angle for the slice, in degrees, measured from +x direction. If omitted, you get the entire ellipse. |
stipple | A bitmap indicating how the interior fill of
the arc will be stippled. Default is
stipple="" (solid).
You'll probably want something like
stipple="gray25" . Has no
effect unless
has been set to some color. |
style | The default is to draw the whole arc; use
style=PIESLICE for this
style. To draw only the circular arc at the edge
of the slice, use
style=ARC . To draw the
circular arc and the chord (a straight line
connecting the endpoints of the arc), use
style=CHORD .
|
width | Width of the border around the outside of the arc. Default is 1 pixel. |