Ovals, mathematically, are ellipses, including circles as a special case. The ellipse is fit into 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 will coincide with the top and left-hand lines of this box, but will fit just inside the bottom and right-hand sides.

To create an 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="" will select this behavior. You can also set this option to any color and the interior of the ellipse will be 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 will be stippled. Default is stipple="", which means a solid color. A typical value would be stipple="gray25". Has no effect unless the fill has been set to some color. See Section 4.7, “Bitmaps”.

tags

The tags to be associated with the object, as a sequence of strings. See Section 6.1.4, “Canvas tags”.

width

Width of the border around the outside of the ellipse. Default is 1 pixel; see Section 4.1, “Dimensions” for possible values. If you set this to zero, the border will not appear. If you set this to zero and make the fill transparent, you can make the entire oval disappear.

其实,是刚知道画椭圆的主要原理,根据两点确定的矩形,然后画一个唯一的内切的椭圆。也就是实现了两点确定一个椭圆。

Python Tkinter canvas oval原理的更多相关文章

  1. (转)]PYTHON Tkinter GUI

    import Tkinterroot=Tkinter.Tk()label=Tkinter.Label(root,text='hello ,python')label.pack()      #将LAB ...

  2. tkinter Canvas画图片大坑总结

    一.ImportError: cannot import name '_imagingtk' 问题描述 使用tkinter画pillow生成的图片时,在tkinter中抛出此异常. 解决方案 pip ...

  3. python Tkinter图形用户编程简单学习(一)

    Events(事件) Events are given as strings, using a special event syntax:事件以字符串的方式给出,使用特殊的事件语法:<modif ...

  4. python写红包的原理流程包含random,lambda其中的使用和见简单介绍

    Python写红包的原理流程 首先来说说要用到的知识点,第一个要说的是扩展包random,random模块一般用来生成一个随机数 今天要用到ramdom中unifrom的方法用于生成一个指定范围的随机 ...

  5. Python程序的执行原理(转载)

    Python程序的执行原理 2013-09-17 10:35 佚名 tech.uc  1. 过程概述 Python先把代码(.py文件)编译成字节码,交给字节码虚拟机,然后虚拟机一条一条执行字节码指令 ...

  6. python模块之HTMLParser(原理很大程度上就是对类构造的熟练运用)

    # -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之HTMLParser(原理很大程度上就是对类构造的熟练运用) import HTMLPar ...

  7. Python Tkinter基础控件入门实例

    分享一个Python Tkinter基础控件用法的入门例子,包括窗口的显示.显示内置图片.弹出窗口.菜单等. 例子,Python Tkinter基础控件的用法 # -*- coding: utf-8 ...

  8. Python Tkinter 学习成果:点歌软件music

    笔者工作业余时间也没什么爱好,社交圈子也小,主要娱乐就是背着自己带电瓶的卖唱音响到住地附近找个人多的位置唱唱KtV. 硬件上点歌就用笔记本电脑,歌曲都是网上下载的mkv格式的含有两个音轨的视频.因此点 ...

  9. Python Tkinter Entry(文本框)

    Python学习记录--关于Tkinter Entry(文本框)的选项.方法说明,以及一些示例. 属性(Options) background(bg) borderwidth(bd) cursor e ...

随机推荐

  1. 在word中使用notepad++实现代码的语法高亮

    转载自:http://blog.csdn.net/woohello/article/details/7621651 有时写文档时需要将代码粘贴到word中,但直接粘贴到word中的代码虽能保持换行与缩 ...

  2. win7 tomcat

    前提需要有java环境 cmd 1- 下载tomcat http://tomcat.apache.org/ download Tomcat7.0 2- 配置环境变量 CATALINA_HOME C:\ ...

  3. 利用radio实现纯css选项卡切换

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtIAAABCCAIAAAD18aaXAAAG70lEQVR4nO3dO5KrPBCGYRY0VV4OEX

  4. Python中def的用法

    def定义了一个模块的变量,或者说是类的变量.它本身是一个函数对象.属于对象的函数,就是对象的属性. def func():    return 2print func() # 1func = 5pr ...

  5. POJ 1190 生日蛋糕(DFS)

    生日蛋糕 Time Limit: 1000MSMemory Limit: 10000KB64bit IO Format: %I64d & %I64u Submit Status Descrip ...

  6. linux----ulimit 限制

    ulimit -a 显示当前用户的各种限制. ulimit -n 的数值表示每个进程可以打开的文件数目. 一般情况下, ulimit -n 的数值是1024. 当进程打开的文件数目超过此限制时,该进程 ...

  7. C和指针c6-1

    #include<stdio.h> #include<stdlib.h> char *find_char(char const *source_str, char const ...

  8. 【Xamarin挖墙脚系列:关闭 OS X El Capitan 中 SIP 安全设置功能】

    比如需要修改内核配置文件: com.apple.Boot.plist 那么我们需要解锁权限. 禁止SIP模式,那么就可以修改此文件了. 在 OS X El Capitan 中有一个跟安全相关的模式叫 ...

  9. HDU 1104 Remainder (BFS)

    题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1104 题意:给你一个n.m.k,有四种操作n+m,n-m,n*m,n%m,问你最少经过多少步,使得最后 ...

  10. tc令牌桶限速心得

    一.实验拓扑与实验现象 实验拓扑如图所示,在①号机上发送数据,③号机上接受数据,同时在④号机的eth1与eth2网口限制速率为115200kbps,命令如下 tc qdisc add dev eth1 ...