Python Tkinter canvas oval原理
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原理的更多相关文章
- (转)]PYTHON Tkinter GUI
import Tkinterroot=Tkinter.Tk()label=Tkinter.Label(root,text='hello ,python')label.pack() #将LAB ...
- tkinter Canvas画图片大坑总结
一.ImportError: cannot import name '_imagingtk' 问题描述 使用tkinter画pillow生成的图片时,在tkinter中抛出此异常. 解决方案 pip ...
- python Tkinter图形用户编程简单学习(一)
Events(事件) Events are given as strings, using a special event syntax:事件以字符串的方式给出,使用特殊的事件语法:<modif ...
- python写红包的原理流程包含random,lambda其中的使用和见简单介绍
Python写红包的原理流程 首先来说说要用到的知识点,第一个要说的是扩展包random,random模块一般用来生成一个随机数 今天要用到ramdom中unifrom的方法用于生成一个指定范围的随机 ...
- Python程序的执行原理(转载)
Python程序的执行原理 2013-09-17 10:35 佚名 tech.uc 1. 过程概述 Python先把代码(.py文件)编译成字节码,交给字节码虚拟机,然后虚拟机一条一条执行字节码指令 ...
- python模块之HTMLParser(原理很大程度上就是对类构造的熟练运用)
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python模块之HTMLParser(原理很大程度上就是对类构造的熟练运用) import HTMLPar ...
- Python Tkinter基础控件入门实例
分享一个Python Tkinter基础控件用法的入门例子,包括窗口的显示.显示内置图片.弹出窗口.菜单等. 例子,Python Tkinter基础控件的用法 # -*- coding: utf-8 ...
- Python Tkinter 学习成果:点歌软件music
笔者工作业余时间也没什么爱好,社交圈子也小,主要娱乐就是背着自己带电瓶的卖唱音响到住地附近找个人多的位置唱唱KtV. 硬件上点歌就用笔记本电脑,歌曲都是网上下载的mkv格式的含有两个音轨的视频.因此点 ...
- Python Tkinter Entry(文本框)
Python学习记录--关于Tkinter Entry(文本框)的选项.方法说明,以及一些示例. 属性(Options) background(bg) borderwidth(bd) cursor e ...
随机推荐
- js前台获取list的demo
后台 bannerlist=homePageService.searchBanner(bannerVO); // 注意这里的Gson的构建方式为GsonBuilder,区别于test1中的Gson g ...
- grep;egrep;fgrep
-1 使用场景:搜索定位内容并输出(所在行) -2 三者区别: --1 grep 默认支持普通正则 --2 egrep 默认支持扩展正则 等同于 grep -E --3 fgrep 速度最快,不支持 ...
- Hdu1089
#include <stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF){ p ...
- 像asp.net Mvc一样开发nodejs+express Mvc站点
像asp.net Mvc一样开发nodejs+express Mvc站点 首先,我是个c#码农.从事Mvc开发已然4个年头了,这两年前端MVC的兴起,我也跟风学了一些,对前端的框架也了解一些,angu ...
- 设置PlaceHolder的颜色
input::-webkit-input-placeholder{ color:green; } input::-webkit-input-placeholder { color: #999; } i ...
- code 代码分析 及其解决方案
官网地址:http://msdn.microsoft.com/zh-cn/library/ms182135.aspx [FxCop.设计规则]11. 不应该使用默认参数 参考地址:http://blo ...
- ZOJ3578(Matrix)
Matrix Time Limit: 10 Seconds Memory Limit: 131072 KB A N*M coordinate plane ((0, 0)~(n, m)). I ...
- 开源安卓播放器:Dolphin Player 简单分析
Dolphin播放器(Dolphin Player)是一款开源的音频和视频播放器,它支持大多数的音频和视频文件模式,也支持大部分的字幕文件格式.它是基于ffmpeg的. 项目主页:http://cod ...
- hibernate多对一的操作解析
在hibernate的关联操作中有很多关系,其中多对一关系是最常见的.我们看这两个表. 这里有部门表和员工表. 那么我们可以这么说一个部门可以有多个员工.这就是1对多的关系.这是我们站在部门表的角度上 ...
- Eclipse 快捷键总结
导包:alt+/ctrl+shift+o (alt+/) 全局文件搜索:ctrl+shift+r 全局关键词搜索:ctrl+h 查看解决方案:ctrl+1 自动补全:abcdefghjklmnopqr ...