FPDFText_GetRect function

  1. @Native<FPDF_BOOL Function(FPDF_TEXTPAGE, Int, Pointer<Double>, Pointer<Double>, Pointer<Double>, Pointer<Double>)>(FPDF_TEXTPAGE, ffi.Int, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>, ffi.Pointer<ffi.Double>)>()
int FPDFText_GetRect(
  1. FPDF_TEXTPAGE text_page,
  2. int rect_index,
  3. Pointer<Double> left,
  4. Pointer<Double> top,
  5. Pointer<Double> right,
  6. Pointer<Double> bottom,
)

Function: FPDFText_GetRect Get a rectangular area from the result generated by FPDFText_CountRects. Parameters: text_page - Handle to a text page information structure. Returned by FPDFText_LoadPage function. rect_index - Zero-based index for the rectangle. left - Pointer to a double value receiving the rectangle left boundary. top - Pointer to a double value receiving the rectangle top boundary. right - Pointer to a double value receiving the rectangle right boundary. bottom - Pointer to a double value receiving the rectangle bottom boundary. Return Value: On success, return TRUE and fill in |left|, |top|, |right|, and |bottom|. If |text_page| is invalid then return FALSE, and the out parameters remain unmodified. If |text_page| is valid but |rect_index| is out of bounds, then return FALSE and set the out parameters to 0.

Implementation

@ffi.Native<
  FPDF_BOOL Function(
    FPDF_TEXTPAGE,
    ffi.Int,
    ffi.Pointer<ffi.Double>,
    ffi.Pointer<ffi.Double>,
    ffi.Pointer<ffi.Double>,
    ffi.Pointer<ffi.Double>,
  )
>()
external int FPDFText_GetRect(
  FPDF_TEXTPAGE text_page,
  int rect_index,
  ffi.Pointer<ffi.Double> left,
  ffi.Pointer<ffi.Double> top,
  ffi.Pointer<ffi.Double> right,
  ffi.Pointer<ffi.Double> bottom,
);