pub unsafe extern "C" fn FPDF_DeviceToPage(
    page: FPDF_PAGE,
    start_x: c_int,
    start_y: c_int,
    size_x: c_int,
    size_y: c_int,
    rotate: c_int,
    device_x: c_int,
    device_y: c_int,
    page_x: *mut f64,
    page_y: *mut f64
) -> FPDF_BOOL
Expand description

Function: FPDF_DeviceToPage Convert the screen coordinates of a point to page 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) device_x - X value in device coordinates to be converted. device_y - Y value in device coordinates to be converted. page_x - A pointer to a double receiving the converted X value in page coordinates. page_y - A pointer to a double receiving the converted Y value in page coordinates. Return value: Returns true if the conversion succeeds, and |page_x| and |page_y| successfully receives the converted coordinates. Comments: The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up.

     NOTE: this coordinate system can be altered when you zoom, scroll,
     or rotate a page, however, a point on the page should always have
     the same coordinate values in the page coordinate system.

     The device coordinate system is device dependent. For screen device,
     its origin is at the left-top corner of the window. However this
     origin can be altered by the Windows coordinate transformation
     utilities.

     You must make sure the start_x, start_y, size_x, size_y
     and rotate parameters have exactly same values as you used in
     the FPDF_RenderPage() function call.