ClientPointToPage
Viewer interaction
Description
Maps a client pixel to the one-based page and the top-down user-space point beneath it after accounting for zoom, scrolling, page layout and view rotation. The conversion runs through the same page-draw geometry the paint path uses and is handle-safe, so it also works on an unparented control
Syntax
Delphi
Function TPDFlibViewer.ClientPointToPage(X, Y: Integer; Out APage: Integer; Out XPt, YPt: Double): Boolean;Parameters
| X, Y | Client pixel coordinates |
|---|---|
| APage | Receives the one-based page under the pixel |
| XPt, YPt | Receive the point in top-down page user-space coordinates |
Return values
| False | The pixel misses every page band; all outputs are 0 |
|---|---|
| True | The pixel lies on a page and the outputs are valid |