Click or drag to resize

PdfiumFPDFText_GetTextGapAtPoint Method

Retrieves the indices of characters surrounding a specific coordinate on a text page.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.111.2704
Syntax
public static void FPDFText_GetTextGapAtPoint(
	IntPtr text_page,
	float x,
	float y,
	bool bBaseLine,
	float xTolerance,
	float yTolerance,
	out int prevIdx,
	out int nextIdx
)

Parameters

text_page  IntPtr
Handle to the text page. Returned by FPDFText_LoadPage.
x  Single
The x-coordinate of the point, in page units.
y  Single
The y-coordinate of the point, in page units.
bBaseLine  Boolean
If set to true, uses the character's baseline for vertical calculations; otherwise, uses the bounding box bottom.
xTolerance  Single
The horizontal tolerance for hit-testing characters.
yTolerance  Single
The vertical tolerance for hit-testing characters.
prevIdx  Int32
When this method returns, contains the index of the character preceding the point, or -1 if not found.
nextIdx  Int32
When this method returns, contains the index of the character following the point, or -1 if not found.
Remarks
This method performs a hit-test against the characters on the page. Control characters (such as line breaks or null characters) are skipped. If a character is found within the specified xTolerance and yTolerance, both prevIdx and nextIdx will point to that character.
See Also