python tkinter坐标转换,,tkinter中坐标
python tkinter坐标转换,,tkinter中坐标
tkinter中坐标原点在左上角,横坐标向右,纵坐标向下,画图需要将坐标转换成右下角的某个点来符合我们的常用坐标
坐标原点设为(x0,y0),横坐标向右,纵坐标向上,:
转换:想实现坐标点(x,y)的显示
实际显示点坐标是(x0+x,y0-y)
xlinepoint=[20,500,900,500]ylinepoint=[20,500,20,20]xy=[20,500,20+40,500-40,20+120,500-200]traceID = graph.create_oval(20-1,500-1,20+1,500+1,fill=‘black‘)traceID1= graph.create_line(xlinepoint,fill=‘black‘)traceID1= graph.create_line(ylinepoint,fill=‘black‘)traceID1= graph.create_line(xy,fill=‘black‘)
以上程序实现的是坐标原点移到(20,500)后显示原点 (40,40),(120,200)三点的连线
python tkinter坐标转换
相关内容
- python 的requests如何使用代理,,headers.py
- VS Code 调试树莓派上的python程序,,安装pip inst
- Python——函数,模块,简单文件读写,,函数(functio
- 初识python(二),,一、分支结构单分支结
- Python 列表排序,,2019-08-25
- python中使用pip安装报错:Fatal error in launcher... 解决方法
- TensorRT&Sample&Python[uff_custom_plugin],,本文是基
- 在 Python 中使用 in_memory 工作空间,,在 Python 中
- python操作数据库,, 目录
- python paramiko的使用介绍,,一:使用parami
评论关闭