像素点转换成MM了
uses Printers;
function PixelToMM(APixel:Real) : Real;
var PixelRate : Real;
begin
case GetDeviceCaps(Printer.Handle, LOGPIXELSX) of //打印机的精度
120 : PixelRate:=0.1701;
180 : PixelRate:=0.1458;
300 : PixelRate:=0.0898;
360 : PixelRate:=0.0729;
600 : PixelRate:=0.0449;
720 : PixelRate:=0.0365;
1200: PixelRate:=0.0224;
end;
Result := APixel * PixelRate;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(floattostr(PixelToMM(600)));
end;