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, YClient pixel coordinates
APageReceives the one-based page under the pixel
XPt, YPtReceive the point in top-down page user-space coordinates

Return values

FalseThe pixel misses every page band; all outputs are 0
TrueThe pixel lies on a page and the outputs are valid

See also

TPDFlibViewer, RegionAtClientPoint, GoToPagePoint