PDFium Delphi Component Docs

PointsToPixels 関数

コンポーネント: TPdf  ·  ユニット: PDFium
指定された DPI で PDF ポイントをピクセルへ変換します

Syntax

function PointsToPixels(Points: Double; PixelsPerInch: Double): Double;

Description

ピクセル / ポイント / インチ単位間で測定値を変換する静的ヘルパーです。PDF 座標はポイントで表されます(1 pt = 1/72 インチ)

指定された DPI で PDF ポイントをピクセルへ変換します。変換式は Round(value * DPI / 72) です

これらのヘルパーはクラス関数です。TPdf をインスタンス化せずに呼び出せます(例: TPdf.PointsToPixels(96))

Remarks

Example

var
  Margin: Double;
begin
  Margin := TPdf.PointsToPixels(300);
  Memo1.Lines.Add(Format('PointsToPixels(300) = %.4f', [Margin]));
end;

See Also

PixelsToInches, PixelsToPoints, PointsToInches