PageRectToClientRect
Viewer interaction
Description
Maps a rectangle given in top-down page user space to client pixels, through the zoom, view rotation and scroll positions currently in effect
The returned rectangle is the axis-aligned hull of the rotated corner pair, and the call works without a window handle so it can be used headlessly
Syntax
Delphi
Function TPDFlibViewer.PageRectToClientRect(APage: Integer; XPt, YPt, WPt, HPt: Double; Out R: TRect): Boolean;Parameters
| APage | 1-based page whose rectangle is mapped |
|---|---|
| XPt | Left edge of the rectangle in page user-space points |
| YPt | Top edge of the rectangle in page user-space points |
| WPt | Width of the rectangle in page user-space points |
| HPt | Height of the rectangle in page user-space points |
| R | Receives the mapped client-pixel rectangle |
Return values
| False | The page is out of range or not laid out in the current display mode, and R is an empty rectangle |
|---|---|
| True | R receives the mapped client rectangle |