DPI and Device-Independent Pixels
来源:互联网 发布:wow2.43数据库 编辑:程序博客网 时间:2024/06/06 21:04
DPI and Device-Independent Pixels
- Dots per inch (DPI)
- Device-independent pixel (DIPs).
DPI:
Points(点):一种尺寸的单位长度就是一个点。一般来说一点是1/72英寸:1 pt = 1/72 inch
这个尺寸是可以改变的。
在计算机屏幕显示的时候,由于像素不是固定的,由两个因素决定:
1 the display resolution显示屏分辨率
2 the physical size of the monitor显示器的尺寸
所以,物理大小的英寸不是有效的丈量方法,因为物理英寸和像素之间的关系并不固定。
因此,使用逻辑单位丈量。一个72-point的字体定义为一个逻辑英寸大小。逻辑英寸是转化为像素。一般Windows使用下面的规定:一个逻辑单位是96个像素。
因此一个72点的字体被渲染程96个像素高。一个12点大小的字体就是16个像素高。
12 points = 12/72 logical inch = 1/6 logical inch = 96/6 pixels = 16 pixels
这就是96 DPI(dots per inch点/英寸),更加准确来说就是96像素每个逻辑单位。
因为实际像素的大小不固定,还可以由用户自行设定。
--MSDN
例如:
由于GDI不是使用DIP计算图像位置的,所以,有时候改变窗口大小,最大化,最小化的时候,会出现怪异的现象,比如本博文中的球的位置,就需要自己动手编程处理窗口改变的时候的球的位置:http://blog.csdn.net/kenden23/article/details/17268877
但是如果使用Direct3D或者Direct2D就不需要,API自动会处理好这些图像位置,不需要额外编程,最小化的时候也可以正常显示,行为跟编程处理的行为是一样的。
- DPI and Device-Independent Pixels
- 【翻译】DPI and Device-Independent Pixels
- Drawing and Printing OpenGL Graphics Using Device-Independent Bitmaps
- What is the difference between DPI (dots per inch) and PPI (pixels per inch)?
- A. Pasha and Pixels
- A. Pasha and Pixels
- 关于ios device dpi
- codeforce A. Pasha and Pixels
- DIB(Device-Independent Bitmap) 设备无关位图
- device-independent bitmap (DIB) 设备无关位图
- n_multiple vectors and linearly independent
- codeforces #508A# Pasha and Pixels
- CF 508A(Pasha and Pixels-暴力)
- codeforces 508 A Pasha and Pixels
- CodeForces 508A Pasha and Pixels
- CodeForces 508A Pasha and Pixels
- DIB(Device-Independent Bitmap,即设备无关位图)小知识
- 与设备无关的单位(Device-independent unit)
- asic设计中的插件使用。
- 【教程】把PPT转WORD形式的方法
- Elevator
- 浮点数与零比较
- delphi for php
- DPI and Device-Independent Pixels
- HDU2177:取(2堆)石子游戏(威佐夫博弈)
- php 多文件上传
- 初识Petri网
- 关于Springframework
- hadoop日志【7】----Task process exit with nonzero status of 65
- Compile FFmpeg on Ubuntu, Debian, or Mint
- 阅读《项目管理之美》后的一些感受
- 用C#绘制实时曲线图