widthWidth of the border around the outside of the arc.Default is 1 pixel.5.2 The canvas bitmap objectA bitmap object on a canvas is shown as two colors, the background color (wherever datavalues are 0) and the <strong>for</strong>eground color (1).The bitmap is positioned relative to point (x; y).positioning options.To create a bitmap object on a canvas C, use:id = C.create_bitmap ( x, y, *options )See the anchor option, below, <strong>for</strong>which returns the integer ID number of the image object <strong>for</strong> that canvas.Options include:anchorbackgroundbitmap<strong>for</strong>egroundtags5.3 The canvas image objectTo display a graphics image on a canvas C, use:id = C.create_image ( x, y, *options )The default is CENTER, meaning that the bitmap iscentered on the (x; y) position. Other possible valuesare N, NE, E, SE, S, SW, W, and NW. For example,if you specify anchor=NE, the bitmap will be positionedso that point (x; y) is located at the northeast(top right) corner of the bitmap.The color that will appear where there are 0 valuesin the bitmap. The default is "", meaningtransparent.The bitmap to be displayed.The color that will appear where there are 1 valuesin the bitmap. The default is "black".The tags to be associated with the object, as a sequenceof strings.This constructor returns the integer ID number of the image object <strong>for</strong> that canvas.The image is positioned relative to point (x; y).positioning options. Options include:anchorimagetagsSee the anchor option, below, <strong>for</strong>The default is CENTER, meaning that the image iscentered on the (x; y) position. Other possible valuesare N, NE, E, SE, S, SW, W, and NW. For example,if you specify anchor=NE, the image will be positionedso that point (x; y) is located at the northeast(top right) corner of the bitmap.The image to be displayed. See Images, above, <strong>for</strong>in<strong>for</strong>mation about how to create images that can beloaded onto canvases.The tags to be associated with the object, as a sequenceof strings.New Mexico Tech Computer Center <strong>Tkinter</strong> <strong>reference</strong>: The Canvas widget Page 18
5.4 The canvas line objectIn general, a line can consist of any number of segments connected end to end, and eachsegment can be straight or curved. To create a canvas line object on a canvas C, use:C.create_line ( x0, y0, x1, y1, ..., xn, yn, *options )The line goes through the series of points (x0; y0); (x1; y1); : : : ; (xn; yn). Options include:arrowarrowshapeThe default is <strong>for</strong> the line to have no arrowheads.Set this option to FIRST to get an arrowhead atthe (x0; y0) end of the line; set it to "last" to getan arrowhead at the far end; set it to "both" <strong>for</strong>arrowheads at both ends.A tuple (d1, d2, d3) that describes the shape ofthe arrowheads added by the arrow option. Defaultis (8,10,3).5.5 The canvas oval objectfill The color to use in drawing the line. Default is"black".smoothIf true, the line is drawn as a series of parabolicsplines fitting the point set. Default is false, whichrenders the line as a set of straight segments.splinestepsIf the smooth option is true, each spline is renderedas a number of straight line segments. Thesplinesteps option specifies the number of segmentsused to approximate each section of the line;the default is 12.stippleTo draw a stippled line, set this option to abitmap that specifies the stippling pattern, such as"gray25".tagsThe tags to be associated with the object, as a sequenceof strings.widthThe line’s width. Default is 1 pixel.Ovals, mathematically, are ellipses, including circles as a special case. The ellipse is fit intoa rectangle defined by the coordinates (x 0 ; y 0 ) of the top left corner and the coordinates(x 1 ; y 1 ) of the bottom right corner:New Mexico Tech Computer Center <strong>Tkinter</strong> <strong>reference</strong>: The Canvas widget Page 19