PDFium Component Docs

LinkAnnotationAtPos Metoda

Ten wpis API zachowuje identyfikatory, sygnatury, bloki kodu i terminy PDF w oryginalnej postaci.
Komponent: TPdfView  ·  Moduł: PDFium
Returns the link-annotation index at the screen pixel (X, Y), or -1.

Składnia

function LinkAnnotationAtPos(X, Y: Integer; out PageNumber: Integer): Integer; overload;

 

function LinkAnnotationAtPos(X, Y: Integer): Integer; overload;

Opis

Returns the link-annotation index at the screen pixel (X, Y), or -1.

Use to implement a "click-to-follow" UI without enabling LinkOptions auto-handling.

TPdfView utrzymuje wewnętrznie transformację device-to-page opartą na Zoom, Rotation, paddingu strony i przesunięciu przewijania; te pomocniki są bezpiecznym publicznym interfejsem do tej transformacji

Uwagi

Przykład

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

Zobacz też

DeviceToPage, LinkAnnotation, OnAnnotationLinkClick