資源簡介
代碼片段和文件信息
#?-*-?coding:?utf-8?-*-?
#!/usr/bin/python
import?math
from?tkinter?import?*
class?PTS:
????def?__init__(self):
????????self.x?=?0
????????self.y?=?0
points?=?[]
def?LineToDemo():
????screenx?=?400
????screeny?=?400
????canvas?=?Canvas(width?=?screenxheight?=?screenybg?=?‘white‘)
????AspectRatio?=?0.85
????MAXPTS?=?15
????h?=?screeny
????w?=?screenx
????xcenter?=?w?/?2
????ycenter?=?h?/?2
????radius?=?(h?-?30)?/?(AspectRatio?*?2)?-?20
????step?=?360?/?MAXPTS
????angle?=?0.0
????for?i?in?range(MAXPTS):
????????rads?=?an
- 上一篇:python 畫板(可做簽名/涂鴉)
- 下一篇:python學生信息管理系統
評論
共有 條評論