function LinkAtPoint(X, Y: Double): Boolean;
| X, Y | Double. Point in PDF page units, with the origin at the bottom-left corner of the page. |
| Result | Boolean. True when a link annotation covers that point. |
LinkAnnotation の矩形を走査するのではなく、PDFium 自身にリンクの有無を問い合わせます。ネイティブテストは注釈の四辺形点を尊重するため、折り返しテキストに従うリンクは、それを囲む境界ボックスではなく実際の形状で一致します
答えは存在のみです。宛先や URI を読むには LinkAnnotation と LinkAnnotationCount を走査するか、ページテキスト内で自動検出された URL には WebLink を使用します
呼び出す前に、マウス位置を DeviceToPage でページ単位に変換します
var PX, PY: Double;
if Pdf.DeviceToPage(X, Y, 0, 0, W, H, ro0, PX, PY) then
if Pdf.LinkAtPoint(PX, PY) then
Screen.Cursor := crHandPoint;