API reference › Rendering & Viewer
rasPrefetchPage
Pre-render a page into the cache's bitmap cache ahead of
BOOL32 __stdcall rasPrefetchPage(IPGC CachePtr, int32_t PageNum);
function rasPrefetchPage(CachePtr: IPGC; PageNum: Integer): LongBool; stdcall;
Purpose. Pre-render a page into the cache's bitmap cache ahead of it becoming visible, so a subsequent rasPaint scroll to it is a cache hit rather than a fresh render.
Description. Computes the page's unrotated render size (same rotation-aware width/height swap as rasPaint) and calls the same shared CacheRenderPage — genuinely real, not merely a hint; the rendered bitmap is retained exactly as if rasPaint had rendered it during a normal scroll.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
PageNum | 1-based page to prefetch. |
Return value. True if the page rendered and was cached; False if CachePtr/document don't resolve or PageNum is out of range.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Rasterizer/Rendering
rasPrefetchPage
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.