PDFium Component Docs

PixelsToPoints function

Component: TPdf  ·  Unit: PDFium
Pretvori mjerenje u pikselima pri zadanom DPI-ju u PDF točke (1/72 inča)

Syntax

function PixelsToPoints(Pixels, PixelsPerInch: Double): Double;

Description

Statički pomoćni alat koji pretvara mjernu vrijednost između piksel / točka / inč jedinica. PDF koordinate su izražene u točkama (1 pt = 1/72 inča).

Convert a pixel measurement at the given DPI to PDF points (1/72 inch). The conversion formula is value * 72 / DPI.

These helpers are class functions; you can call them without instantiating TPdf (e.g. TPdf.PixelsToPoints(96)).

Remarks

Example

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

See Also

PixelsToInches, PointsToInches, PointsToPixels