 | PdfiumFPDF_DeviceToPage Method |
Convert the screen coordinate of a point to page coordinate.
Namespace: Patagames.PdfAssembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntaxpublic static void FPDF_DeviceToPage(
IntPtr page,
int start_x,
int start_y,
int size_x,
int size_y,
PageRotate rotate,
int device_x,
int device_y,
out double page_x,
out double page_y
)
Public Shared Sub FPDF_DeviceToPage (
page As IntPtr,
start_x As Integer,
start_y As Integer,
size_x As Integer,
size_y As Integer,
rotate As PageRotate,
device_x As Integer,
device_y As Integer,
<OutAttribute> ByRef page_x As Double,
<OutAttribute> ByRef page_y As Double
)
public:
static void FPDF_DeviceToPage(
IntPtr page,
int start_x,
int start_y,
int size_x,
int size_y,
PageRotate rotate,
int device_x,
int device_y,
[OutAttribute] double% page_x,
[OutAttribute] double% page_y
)
static member FPDF_DeviceToPage :
page : IntPtr *
start_x : int *
start_y : int *
size_x : int *
size_y : int *
rotate : PageRotate *
device_x : int *
device_y : int *
page_x : float byref *
page_y : float byref -> unit
public static void FPDF_DeviceToPage(
IntPtr page,
int start_x,
int start_y,
int size_x,
int size_y,
PageRotate rotate,
int device_x,
int device_y,
/** @attribute OutAttribute */ /** @ref */double page_x,
/** @attribute OutAttribute */ /** @ref */double page_y
)
Patagames.Pdf.Pdfium.FPDF_DeviceToPage = function(page, start_x, start_y, size_x, size_y, rotate, device_x, device_y, page_x, page_y);
Parameters
- page IntPtr
- Handle to the page. Returned by FPDF_LoadPage(IntPtr, Int32) function.
- start_x Int32
- Left pixel position of the display area in the device coordinate
- start_y Int32
- Top pixel position of the display area in the device coordinate
- size_x Int32
- Horizontal size (in pixels) for displaying the page
- size_y Int32
- Vertical size (in pixels) for displaying the page
- rotate PageRotate
- Page orientation: 0 (normal), 1 (rotated 90 degrees clockwise),2 (rotated 180 degrees), 3 (rotated 90 degrees counter-clockwise).
- device_x Int32
- X value in device coordinate, for the point to be converted
- device_y Int32
- Y value in device coordinate, for the point to be converted
- page_x Double
- A pointer to a double value receiving the converted X value in page coordinate
- page_y Double
- A pointer to a double value receiving the converted Y value in page coordinate
RemarksThe page coordinate system has its origin at left-bottom corner of the page, with X axis goes
along the bottom side to the right, and Y axis goes along the left side upward. 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 dependant. For screen device, its origin is at left-top
corner of the window. However this origin can be altered by Windows coordinate
transformation utilities. You must make sure the start_x, start_y, size_x, size_y and rotate
parameters have exactlysame values as you used in
FPDF_RenderPage(IntPtr, IntPtr, Int32, Int32, Int32, Int32, PageRotate, RenderFlags) function call.
See Also