RichView TRVUnits 图像、打印(字体)、屏幕显示单位
在RichViewk中,使用的单位有很多种,一定要搞清楚,否则出现偏差时,你还不知道问题的出处。
RichViewk相关图像单位的声明:
type
TRVUnits = (rvuInches, rvuCentimeters, rvuMillimeters, rvuPicas, rvuPixels, rvuPoints);
TRVStyleUnits = (rvstuPixels, rvstuTwips, rvstuEMU);
值Value 意思Meaning
rvuInches 英寸,1英寸= 2.54厘米
rvuCentimeters 厘米
rvuMillimeters 毫米
rvuPicas 派卡(印刷字母规格和字行长度单位)
1 pica = 1/6英寸 = 12 points.
rvuPixels 像素
1 pixel = 1/TRVStyle.UnitsPerInch of an inch.
(通常为1/96英寸,通常1英寸有96pixel)
rvuPoints 点或磅值(用于排版)
1 point = 1/72英寸
rvstuEMU EMU(English metric units)英语公制单位
1 EMU = 1/914400 of an inch = 1/36000 mm
上述单位,不同场合,使用的不同的单位。都是欧洲人的习惯。
实际使用时,本人通常换算为厘米或像素值,对于图像的显示,RichView使用Pixels,实际运用时,换算如下:
iH:=8; // 图像高厘米
iW:=3; // 图像宽厘米
iHeight:=Trunc(96*iH/2.45); // 厘米转像素
iWidth:=Trunc(96*iW/2.45); // 厘米转像素
iP:=11; // 字体磅数
iWidth:=Trunc(96*iP/72); // 磅数转像素
那么,对应的字体尺寸:
八号= 5磅 =(5/72)*96 =6.67 Pixels
七号=5.5磅 =(5.5/72)*96 =7.3 Pixels
小六=6.5磅 =(6.5/72)*96 =8.67 Pixels
六号=7.5磅 =(7.5/72)*96 =10 Pixels
小五= 9磅 =(9/72)*96 =12 Pixels
五号=10.5磅=(10.5/72)*96=14 Pixels
小四= 12磅 =(12/72)*96 =16 Pixels
四号= 14磅 =(14/72)*96 =18.67 Pixelsx
小三= 15磅 =(15/72)*96 =20 Pixels
三号= 16磅 =(16/72)*96 =21.3 Pixels
小二= 18磅 =(18/72)*96 =24 Pixels
二号= 22磅 =(22/72)*96 =29.3 Pixels
小一= 24磅 =(24/72)*96 =32 Pixels
一号= 26磅 =(26/72)*96 =34.67Pixels
小初= 36磅 =(36/72)*96 =48 Pixels
初号= 42磅 =(42/72)*96 =56 Pixels