function PixelsToPoints(Pixels, PixelsPerInch: Double): Double;
在像素 / 點 / 英吋單位之間轉換量測值的靜態輔助函式。PDF 座標以點表示(1 pt = 1/72 英吋)
將指定 DPI 下的像素量測值轉換為 PDF 點(1/72 英吋)。轉換公式為 value * 72 / DPI
這些輔助函式是類別函式;您可以在不具現化 TPdf 的情況下呼叫它們(例如 TPdf.PixelsToPoints(96))
*To* 函式使用
var
Margin: Double;
begin
Margin := TPdf.PixelsToPoints(300);
Memo1.Lines.Add(Format('PixelsToPoints(300) = %.4f', [Margin]));
end;