Ovals, mathematically, is ellipses, including circles as a special case. The ellipse is fit to a rectangle defined by the coordinates (x0, y0) of the top left Corner and the coordinates (x1, y1) of the bottom right corner:
The oval would coincide with the top and left-hand lines of this box, but would fit just inside the bottom and right-hand si Des.
To create a ellipse on a canvas C, use:
id = C. Create_oval ( x0, y0, x1, y1, option, ...)
Which returns the object ID of the new Oval object on canvas C.
Options for ovals:
Fill |
The default appearance of ellipse is transparent, and a value of fill= "" would Select this behavior. You can also set this option to any color and the interior of the ellipse would be a filled with that color; See section 4.3, "Colors". |
Outline |
The color of the border around the outside of the ellipse. Default is outline= "Black". |
Stipple |
A bitmap indicating how the interior of the ellipse would be stippled. Default is stipple= "", which means a solid color. A typical value would be stipple= "gray25". has no effect unless the fill have been set to some color. See section 4.7, "Bitmaps". |
Tags |
The tags to is associated with the object, as a sequence of strings. See section 6.1.4, "Canvas tags". |
Width |
The Width of the border around the outside of the ellipse. Default is 1 pixel; See sections 4.1, "Dimensions" for possible values. If you set this to zero, the border is not appear. If you set this to zero and make the fill transparent, you can make the entire oval disappear. |
In fact, it is just that the main principle of the ellipse is known, according to the two-point rectangle, and then draw a unique inner-tangent ellipse. That is to achieve a two point to determine an ellipse.
Python Tkinter Canvas Oval principle