BOOL32 __stdcall rasGetPagePos(IPGC CachePtr, int32_t PageNum, int32_t* X, int32_t* Y);
function rasGetPagePos(CachePtr: IPGC; PageNum: Integer; var X, Y: Integer): LongBool; stdcall;
Purpose. Resolve a specific page's top-left position in the cache's current scrolled viewport — the by-page-number counterpart to rasGetPageMatrix's current-page-only computation.
Description. Same vertical-accumulation logic as rasGetPageMatrix/rasGetPageAt, but for an explicit PageNum (validated against 1..PageCount) rather than the cache's stored current page — this is the function to use to locate an *arbitrary* page's position; rasGetPageMatrix cannot.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
PageNum | 1-based page to locate (any page, not just the current one). |
X, Y | Output: top-left in scrolled viewport coordinates. |
Return value. True if PageNum is valid and the document resolves; False otherwise.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Rasterizer/Rendering
rasGetPagePos
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.