Twips 是 VB 裡的一個單位,在 VB Controll (控制項)的顯示上會用來指定長、寬、位置等等。
以下是 MSDN 的說明

A screen-independent, absolute unit of measurement (such as an inch or a centimeter). A twip is a unit of length equal to 1/20 of a printer's point, and a printer's point is 1/72 of an inch. There are approximately 1440 twips to a logical inch or 567 twips to a logical centimeter (the length of a screen item measuring one inch or one centimeter when printed).

經過測試,1440 twips 就是等於 1 inch。而不是 1/20 的 printer point。也就是說,如果想要把 twips 對應到 pixel,得把螢幕的解析度找出來才行。

以 72 DPI的解析度來說,一個 pixel 就是等於 20 twips ( 1440 / 72 ),如果以我目前的螢幕 96 DPI 來說,一個 pixel 就是等於 15 twips ( 1440 / 96 )。

我之前看這英文,還以為,一個 pixel 就是等於 20 twips ,在 72 DPI 下 1440 twips 看起來會是 1 inch,在 96 DPI 下 1440 twips 看起來會是 0.75 inch ( 1440 / 20 /96 )。我的英文還要加強就是了。

創作者介紹
創作者 betaparticle的部落格 的頭像
betaparticle

betaparticle的部落格

betaparticle 發表在 痞客邦 留言(2) 人氣( 169 )