为什么ramy winfo\u screenmmwidth()和winfo\u screenmmheight()得到了一些奇怪的数字?
我必须把我的宽度乘以3.78,把高度乘以3.779
from tkinter import *
from PIL import ImageTk,Image
root = Tk()
root.title("My Program")
# Designate the height and width of our app
app_width = 500
app_height = 500
screen_width = root.winfo_screenmmwidth()
screen_height = root.winfo_screenmmheight()
dpi = root.winfo_fpixels('1i')
real_width = int(screen_width * 3.78)
real_height = int(screen_height * 3.779)
root.geometry(f"{app_width}x{app_height}+{1000}+{200}")
mylbl = Label(root,text=f"{real_width}x{real_height}")
mylbl.pack()
root.mainloop()
当我不做奇怪的乘法运算时,得到的是508x286,而不是1920x1080
是什么原因造成的?