【发布时间】:2015-05-01 15:26:21
【问题描述】:
我在画布中有一条线,我想旋转 x 度数,同时保持画布中间的起点,我想知道计算终点坐标的公式是什么?,像
degrees=xnumberofdegrees
lineEndPoint=degrees*someformulaforxandy
canvas = Canvas(root, width=500, height=500, bg="white")
canvas.pack()
rotatedline=space.create_line(250,250,lineEndPoint)
起点应该始终是 250,250,因为画布的大小是 500x500,所以我只需要终点。欢迎任何帮助。
【问题讨论】:
-
我对这个问题感到非常失望 - 为什么不是关于如何旋转
Canvas中的现有行?可以移动现有对象(“椭圆”等),但如果我们想任意更改端点怎么办?
标签: python canvas tkinter line