API reference › Rendering & Viewer
rasDeleteRasterizer
Create a single-buffer software rasterizer (IRAS) over
IRAS __stdcall rasCreateRasterizer(PPDF IPDF, void** Rows, void* Buffer, uint32_t Width, uint32_t Height, int32_t ScanlineLen, TPDFPixFormat PixelFormat);
IRAS __stdcall rasCreateRasterizerEx(PPDF IPDF, HDC DC, uint32_t Width, uint32_t Height, TPDFPixFormat PixFmt);
void __stdcall rasDeleteRasterizer(PIRAS RasPtr);
function rasCreateRasterizer(const IPDF: PPDF; Rows: PPointer; Buffer: Pointer; Width, Height: Cardinal; ScanlineLen: Integer; PixelFormat: TPDFPixFormat): IRAS; stdcall;
function rasCreateRasterizerEx(const IPDF: PPDF; DC: HDC; Width, Height: Cardinal; PixFmt: TPDFPixFormat): IRAS; stdcall;
procedure rasDeleteRasterizer(RasPtr: PIRAS); stdcall;
Purpose. Create a single-buffer software rasterizer (IRAS) over either a caller-supplied pixel buffer (rasCreateRasterizer) or an internally-owned buffer that can optionally blit to a HDC (rasCreateRasterizerEx); rasDeleteRasterizer frees it.
Description. Both creators eagerly render the document's active page immediately at creation time (RasBlitPage0(R)), not lazily on first paint/render call — per an explicit source comment, this replaced a former nil-returning stub ("G-57/G-06: real DC-based rasterizer. Was a nil stub; now creates a genuine rasterizer object"). rasCreateRasterizer wraps the caller's own Buffer directly (no copy); rasCreateRasterizerEx allocates and owns an internal RGB24 buffer (R.OwnBuf) sized Width*Height*3, and additionally blits it to DC immediately if DC <> 0. Rows (a void** row-pointer table, common in other rasterizer APIs for scanline access) is accepted by rasCreateRasterizer's ABI but this chapter did not find it consulted anywhere in the body. RasPtr in rasDeleteRasterizer is a var/pointer-to-handle: it is nulled out after freeing, and a nil-pointer RasPtr itself is a safe no-op.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle whose active page renders immediately into the new rasterizer. |
Rows | Accepted; not observed to be consulted. |
Buffer | Caller-owned pixel buffer (rasCreateRasterizer only) — used directly, not copied. |
DC | *(Ex only)* If non-zero, the initial render is blitted here immediately. |
Width, Height, ScanlineLen/PixFmt | Buffer geometry/format. |
RasPtr | *(Delete only)* var/pointer to the handle; nulled after freeing. Nil-safe. |
Return value. rasCreateRasterizer(Ex): a new IRAS handle (always non-nil for rasCreateRasterizer; nil for rasCreateRasterizerEx if IPDF doesn't resolve).
C# (P/Invoke)
public static extern void rasDeleteRasterizer(IntPtr RasPtr);
Rasterizer/Rendering
rasDeleteRasterizer
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.