API reference › Rendering & Viewer
rasChangeBackColor
Three real paint-configuration setters: the viewport
void __stdcall rasChangeBackColor(IPGC CachePtr, uint32_t Value);
BOOL32 __stdcall rasSetOCGState(IPGC CachePtr, uint32_t Handle, BOOL32 Visible, BOOL32 SaveState);
void __stdcall rasSetOnPaintCallback(IPGC CachePtr, void* UserData, TOnUpdateWindow Callback);
procedure rasChangeBackColor(CachePtr: IPGC; Value: Cardinal); stdcall;
function rasSetOCGState(CachePtr: IPGC; Handle: Cardinal; Visible, SaveState: LongBool): LongBool; stdcall;
procedure rasSetOnPaintCallback(CachePtr: IPGC; const UserData: Pointer; Callback: TOnUpdateWindow); stdcall;
Purpose. Three real paint-configuration setters: the viewport background fill color, per-optional-content-group visibility (consumed by rasRenderTile's content-filtering above), and a host repaint callback (consumed by rasUpdate above).
Description. rasChangeBackColor stores C.BackColor, read by rasPaint's ViewerFillBG call. rasSetOCGState adds/removes Handle from C.HiddenOCG (a real TList<Cardinal>) based on Visible, and calls C.ClearRenderCache — invalidating any bitmaps cached before the visibility change so the next paint/tile render reflects it; SaveState is accepted but this chapter did not find it consulted (no persistent "saved OCG state" mechanism was located). rasSetOnPaintCallback stores Callback/UserData — per an inline comment, this was formerly a silent no-op that discarded the callback and is now genuinely invoked by rasUpdate.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
Value | *(ChangeBackColor only)* New background color, read by rasPaint. |
Handle | *(SetOCGState only)* The optional-content-group handle to show/hide. |
Visible | *(SetOCGState only)* Adds/removes Handle from the hidden-OCG list; also clears the render cache. |
SaveState | *(SetOCGState only)* Accepted; not observed to be consulted. |
UserData, Callback | *(SetOnPaintCallback only)* Stored and genuinely invoked by rasUpdate. |
Return value. rasSetOCGState: True if CachePtr resolves. rasChangeBackColor/rasSetOnPaintCallback: none.
C# (P/Invoke)
public static extern void rasChangeBackColor(IntPtr CachePtr, uint Value);
Rasterizer/Rendering
rasChangeBackColor
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.