API reference › Rendering & Viewer
rasSetClientRect
Resize the page cache's viewport from a client rectangle.
void __stdcall rasSetClientRect(IPGC CachePtr, HDC DC, TIntRect* ClientRect);
procedure rasSetClientRect(CachePtr: IPGC; DC: HDC; var ClientRect: TIntRect); stdcall;
Purpose. Resize the page cache's viewport from a client rectangle.
Description. Computes width/height from ClientRect's corners, normalizing a reversed rect (negative width/height) via Abs, and only updates C.Width/C.Height if the resulting size is non-degenerate (both > 0) — a zero-area or unset rect is silently ignored rather than zeroing the viewport. DC is accepted but never read — this function does not touch any device context despite the parameter.
Parameters.
| Parameter | Description |
|---|---|
CachePtr | Target page cache. |
DC | Accepted but never read. |
ClientRect | Corners in either order (auto-normalized); ignored entirely if the resulting size is 0 in either dimension. |
Return value. None.
C# (P/Invoke)
public static extern void rasSetClientRect(IntPtr CachePtr, UIntPtr DC, ref TIntRect ClientRect);
Rasterizer/Rendering
rasSetClientRect
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.