PDFium Component Docs

PageToDevice Methode

Dieser API-Eintrag behält Bezeichner, Signaturen, Codeblöcke und PDF-Begriffe in ihrer Originalform.
Komponente: TPdfView  ·  Unit: PDFium
Inverse of DeviceToPage: converts a PDF user-space point to a screen pixel inside the view.

Syntax

function PageToDevice(PageX, PageY: Double; out X, Y: Integer): Boolean; overload;

 

function PageToDevice(Rectangle: TPdfRectangle): TRect; overload;

Beschreibung

Inverse of DeviceToPage: converts a PDF user-space point to a screen pixel inside the view.

Use to position a VCL TLabel or TShape over a specific PDF coordinate.

TPdfView verwaltet die Geräte-zu-Seite-Transformation intern anhand von Zoom, Rotation, Seitenabstand und Scroll-Offset; diese Hilfsfunktionen sind die sichere öffentliche Schnittstelle zu dieser Transformation

Hinweise

Beispiel

procedure TForm1.PdfView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  PageX, PageY: Double;
begin
  if PdfView1.PageToDevice(X, Y, PageX, PageY) then
    Caption := Format('pt = (%.2f, %.2f)', [PageX, PageY]);
end;

Siehe auch

DeviceToPage