PDFium Delphi Component Docs

PixelsToInches 함수

유닛: PDFium
주어진 DPI에서 픽셀 측정값을 inch로 변환합니다

구문

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

설명

pixel / point / inch 단위 사이의 측정값을 변환하는 정적 헬퍼입니다. PDF 좌표는 point로 표현됩니다(1 pt = 1/72 inch)

주어진 DPI에서 픽셀 측정값을 inch로 변환합니다. 변환 공식은 value / DPI입니다

PDFium 유닛의 유닛 수준 헬퍼 함수이므로 TPdf를 인스턴스화하지 않고도 호출할 수 있습니다(예: PixelsToInches(96, 96))

참고 사항

예제

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

관련 항목

PixelsToPoints, PointsToInches, PointsToPixels