API reference › Rendering & Viewer
rasSetDefPageLayout
Get/set the cache's active page layout (single-page vs.
TPageLayout __stdcall rasGetPageLayout(IPGC CachePtr);
void __stdcall rasSetPageLayout(IPGC CachePtr, TPageLayout Value);
TPageLayout __stdcall rasGetDefPageLayout(IPGC CachePtr);
void __stdcall rasSetDefPageLayout(IPGC CachePtr, TPageLayout Value);
function rasGetPageLayout(CachePtr: IPGC): TPageLayout; stdcall;
procedure rasSetPageLayout(CachePtr: IPGC; Value: TPageLayout); stdcall;
function rasGetDefPageLayout(CachePtr: IPGC): TPageLayout; stdcall;
procedure rasSetDefPageLayout(CachePtr: IPGC; Value: TPageLayout); stdcall;
Purpose. Get/set the cache's active page layout (single-page vs. continuous scroll), and independently its "default" layout value.
Description. PageLayout and DefPageLayout are two entirely separate stored fields with no linkage between them — rasSetDefPageLayout writes only DefPageLayout, which no other function in this cluster reads back except rasGetDefPageLayout itself (this chapter did not find it consulted by the rendering/layout pipeline; it behaves as caller-managed metadata, not an actual "reset to default" mechanism — there is no rasResetPageLayout-style function that copies DefPageLayout into PageLayout). rasSetPageLayout, by contrast, has a real behavioral effect: Value = 0 (plSinglePage) sets C.SinglePageMode := True via a dedicated boolean flag (per an inline comment, kept separate specifically so layout 0's ambiguous default doesn't silently misclassify); any other Value selects the continuous-vertical default.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
Value | Layout mode (0 = single page; anything else = continuous). |
Return value. rasGetPageLayout/rasGetDefPageLayout: the respective stored value (TPageLayout(0) if CachePtr doesn't resolve).
C# (P/Invoke)
public static extern void rasSetDefPageLayout(IntPtr CachePtr, int Value);
Rasterizer/Rendering
rasSetDefPageLayout
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.