API reference › Rendering & Viewer
rasResizeViewport
rasResize/rasResizeViewport resize an IPGC page
BOOL32 __stdcall rasResize(IPGC CachePtr, int32_t Width, int32_t Height);
BOOL32 __stdcall rasResizeBitmap(IRAS RasPtr, HDC DC, uint32_t Width, uint32_t Height);
void __stdcall rasResizeViewport(IPGC CachePtr, float Width, float Height);
function rasResize(CachePtr: IPGC; Width, Height: Integer): LongBool; stdcall;
function rasResizeBitmap(RasPtr: IRAS; DC: HDC; Width, Height: Cardinal): LongBool; stdcall;
procedure rasResizeViewport(CachePtr: IPGC; Width, Height: Single); stdcall;
Purpose. rasResize/rasResizeViewport resize an IPGC page cache's viewport; rasResizeBitmap resizes and re-renders an IRAS rasterizer's own buffer.
Description. rasResize and rasResizeViewport are functionally identical (both just set C.Width/C.Height, one taking Integer, the other Single, rounded) — genuinely interchangeable, two ABI entry points for one effect, no DC parameter on either despite rasResizeBitmap accepting one. rasResizeBitmap was historically a no-op (per an inline comment: "G-06: real resize ... Was a no-op that stored W/H and returned True") and is now fully implemented: it updates R.Width/R.Height, recomputes R.ScanlineLen for RGB/BGR pixel formats (3 * Width, tight-packed — no stride padding), and immediately re-renders the active page into the resized buffer via RasBlitPage0. DC is accepted by rasResizeBitmap's ABI but this resize path itself does not blit anywhere (blitting is a separate step via rasRedraw/rasPaint, Rendering, Painting, and the Tile Pipeline).
Parameters.
| Parameter | Description |
|---|---|
CachePtr | *(Resize/ResizeViewport)* Target page cache. |
RasPtr | *(ResizeBitmap)* Target rasterizer; immediately re-rendered after resizing. |
DC | *(ResizeBitmap)* Accepted; not used by the resize/re-render itself. |
Width, Height | New dimensions. |
Return value. rasResize/rasResizeBitmap: True if the target resolves; False otherwise. rasResizeViewport: none (procedure).
C# (P/Invoke)
public static extern void rasResizeViewport(IntPtr CachePtr, float Width, float Height);
Rasterizer/Rendering
rasResizeViewport
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.