[Tkinter-discuss] 回复: one pixel=how many mm?

守株待兔 1248283536 at qq.com
Sun Aug 28 11:47:18 CEST 2011


in my computer:
 xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm

>>> import Tkinter
>>> root=Tkinter.Tk()
>>> k=root.winfo_fpixels('1m')
>>> print k
3.78698224852
>>> print 1280/k
338.0
why  it's  338  ,not  331mm??


 
------------------ 原始邮件 ------------------
发件人: "Martin B"<spooky.ln at tbs-software.com>;
发送时间: 2011年8月28日(星期天) 下午2:37
收件人: "tkinter-discuss"<tkinter-discuss at python.org>; 

主题: Re: [Tkinter-discuss] one pixel=how many mm?

 
 V Sun, 28 Aug 2011 10:10:30 +0800
"守株待兔" <1248283536 at qq.com> napsáno:

> in tkinter ,you can express  width in cm ,mm,inch,,pixel
> i want to know:
>  one pixel=how many mm?
 
pixels per mm   = root.winfo_fpixels('1m')
pixels per point = root.winfo_fpixels('1p')
pixels per inch   = root.winfo_fpixels('1i')
pixels per cm     = root.winfo_fpixels('1c')
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss at python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20110828/74407af2/attachment.html>


More information about the Tkinter-discuss mailing list