FPDF_PageToDevice function

  1. @Native<FPDF_BOOL Function(FPDF_PAGE, Int, Int, Int, Int, Int, Double, Double, Pointer<Int>, Pointer<Int>)>(FPDF_PAGE, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Int, ffi.Double, ffi.Double, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>()
int FPDF_PageToDevice(
  1. FPDF_PAGE page,
  2. int start_x,
  3. int start_y,
  4. int size_x,
  5. int size_y,
  6. int rotate,
  7. double page_x,
  8. double page_y,
  9. Pointer<Int> device_x,
  10. Pointer<Int> device_y,
)

Function: FPDF_PageToDevice Convert the page coordinates of a point to screen coordinates. Parameters: page - Handle to the page. Returned by FPDF_LoadPage. start_x - Left pixel position of the display area in device coordinates. start_y - Top pixel position of the display area in device coordinates. size_x - Horizontal size (in pixels) for displaying the page. size_y - Vertical size (in pixels) for displaying the page. rotate - Page orientation: 0 (normal) 1 (rotated 90 degrees clockwise) 2 (rotated 180 degrees) 3 (rotated 90 degrees counter-clockwise) page_x - X value in page coordinates. page_y - Y value in page coordinate. device_x - A pointer to an integer receiving the result X value in device coordinates. device_y - A pointer to an integer receiving the result Y value in device coordinates. Return value: Returns true if the conversion succeeds, and |device_x| and |device_y| successfully receives the converted coordinates. Comments: See comments for FPDF_DeviceToPage().

Implementation

@ffi.Native<
  FPDF_BOOL Function(
    FPDF_PAGE,
    ffi.Int,
    ffi.Int,
    ffi.Int,
    ffi.Int,
    ffi.Int,
    ffi.Double,
    ffi.Double,
    ffi.Pointer<ffi.Int>,
    ffi.Pointer<ffi.Int>,
  )
>()
external int FPDF_PageToDevice(
  FPDF_PAGE page,
  int start_x,
  int start_y,
  int size_x,
  int size_y,
  int rotate,
  double page_x,
  double page_y,
  ffi.Pointer<ffi.Int> device_x,
  ffi.Pointer<ffi.Int> device_y,
);