 | PdfiumFPDFText_GetTextGapAtPoint Method |
Retrieves the indices of characters surrounding a specific coordinate on a text page.
Namespace: Patagames.PdfAssembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.111.2704
Syntaxpublic static void FPDFText_GetTextGapAtPoint(
IntPtr text_page,
float x,
float y,
bool bBaseLine,
float xTolerance,
float yTolerance,
out int prevIdx,
out int nextIdx
)
Public Shared Sub FPDFText_GetTextGapAtPoint (
text_page As IntPtr,
x As Single,
y As Single,
bBaseLine As Boolean,
xTolerance As Single,
yTolerance As Single,
<OutAttribute> ByRef prevIdx As Integer,
<OutAttribute> ByRef nextIdx As Integer
)
public:
static void FPDFText_GetTextGapAtPoint(
IntPtr text_page,
float x,
float y,
bool bBaseLine,
float xTolerance,
float yTolerance,
[OutAttribute] int% prevIdx,
[OutAttribute] int% nextIdx
)
static member FPDFText_GetTextGapAtPoint :
text_page : IntPtr *
x : float32 *
y : float32 *
bBaseLine : bool *
xTolerance : float32 *
yTolerance : float32 *
prevIdx : int byref *
nextIdx : int byref -> unit public static void FPDFText_GetTextGapAtPoint(
IntPtr text_page,
float x,
float y,
boolean bBaseLine,
float xTolerance,
float yTolerance,
/** @attribute OutAttribute */ /** @ref */int prevIdx,
/** @attribute OutAttribute */ /** @ref */int nextIdx
)
Patagames.Pdf.Pdfium.FPDFText_GetTextGapAtPoint = function(text_page, x, y, bBaseLine, xTolerance, yTolerance, prevIdx, 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