Python ht wasxrandr——输出HDMI1——向右旋转。由于这是一个带触摸屏的亭子,我还必须旋转触摸屏,xinput set prop“Advanced Silicon S.A CoolTouch(TM)系统”“坐标变换矩阵”0 1 0-1 0 1 0 0
Python ht wasxrandr——输出HDMI1——向右旋转。由于这是一个带触摸屏的亭子,我还必须旋转触摸屏,xinput set prop“Advanced Silicon S.A CoolTouch(TM)系统”“坐标变换矩阵”0 1 0-1 0 1 0 0,python,linux,rotation,tkinter,Python,Linux,Rotation,Tkinter,ht wasxrandr——输出HDMI1——向右旋转。由于这是一个带触摸屏的亭子,我还必须旋转触摸屏,xinput set prop“Advanced Silicon S.A CoolTouch(TM)系统”“坐标变换矩阵”0 1 0-1 0 1 0 0 1这是因为我尝试为亭子开发一个简单的绘画程序。信息亭上的屏幕旋转90度,因此程序必须随之旋转。移除边界是一个很好的解决方案(我也计划这么做),但有一个障碍。如果我有这样的菜单栏。添加命令(label=“Reset Image”,command
ht was
xrandr——输出HDMI1——向右旋转
。由于这是一个带触摸屏的亭子,我还必须旋转触摸屏,xinput set prop“Advanced Silicon S.A CoolTouch(TM)系统”“坐标变换矩阵”0 1 0-1 0 1 0 0 1
这是因为我尝试为亭子开发一个简单的绘画程序。信息亭上的屏幕旋转90度,因此程序必须随之旋转。移除边界是一个很好的解决方案(我也计划这么做),但有一个障碍。如果我有这样的菜单栏。添加命令(label=“Reset Image”,command=restart\u program)它将出现在左侧,并且不会随窗口“旋转”。似乎我可以使用锚定
选项来更改它。啊,好的,我明白你的意思了,你看过linux发行版的文档了吗,看看是否有旋转整个屏幕输出的选项?这是很多图形卡上的一个常见功能,一些操作系统的do功能也内置了对这一功能的支持,看起来这可能是最简单的选择,但我猜你使用的是触摸屏?因此,我不知道这将做什么,我认为它需要重新配置以匹配..失败(我知道这是多么令人头痛),但你可能必须实现自己的菜单方法来实现它i成功地在操作系统中打开屏幕。但我用菜单解决了这个问题,用创建按钮和改变坐标来代替。但我不需要这些屏幕向右旋转90度的命令是xrandr--output HDMI1--rotate right
。由于这是带有触摸屏的信息亭,我还必须旋转触摸屏,xinput set prop“Advanced Silicon S.A CoolTouch(TM)系统”“坐标变换矩阵”0 1 0-1 0 1 0 0 1
from Tkinter import *
"""paint.py: not exactly a paint program.. just a smooth line drawing demo."""
b1 = "up"
xold, yold = None, None
def main():
root = Tk()
drawing_area = Canvas(root)
drawing_area.pack()
drawing_area.bind("<Motion>", motion)
drawing_area.bind("<ButtonPress-1>", b1down)
drawing_area.bind("<ButtonRelease-1>", b1up)
root.mainloop()
def b1down(event):
global b1
b1 = "down" # you only want to draw when the button is down
# because "Motion" events happen -all the time-
def b1up(event):
global b1, xold, yold
b1 = "up"
xold = None # reset the line when you let go of the button
yold = None
def motion(event):
if b1 == "down":
global xold, yold
if xold is not None and yold is not None:
event.widget.create_line(xold,yold,event.x,event.y,smooth=TRUE)
# here's where you draw it. smooth. neat.
xold = event.x
yold = event.y
if __name__ == "__main__":
main()
root.overrideredirect(True)
xrandr --output HDMI1 --rotate right