IGPC __stdcall gpcNewGPC(void);
void __stdcall gpcDeleteGPC(IGPC IGPC_);
void __stdcall gpcReset(IGPC IGPC_);
function gpcNewGPC: IGPC; stdcall;
procedure gpcDeleteGPC(const IGPC_: IGPC); stdcall;
procedure gpcReset(const IGPC_: IGPC); stdcall;
Purpose. Create/destroy/reset a GPC (polygon-clipper) context handle — the standalone Alan Murta GPC v2.32-interface-compatible boolean polygon clipper, entirely independent of any PPDF document handle.
Description. gpcNewGPC allocates a bare marker object (TLumasGPC, an empty class) and returns it cast to IGPC — the context carries no state of its own; gpcReset is a verified complete no-op ("stateless context; nothing to reset," per the source's own comment) — calling it has no observable effect. gpcDeleteGPC frees the marker object (safe against nil). Because the context is stateless, all real work happens per-call in gpcAddVertex/gpcClipPoly against caller-owned polygon structs, not against anything tracked by the IGPC handle itself — the handle exists purely to satisfy the classic GPC library's calling convention (which in the original C library carries allocator/error-callback state that this independent port doesn't need).
Parameters.
| Parameter | Description |
|---|---|
IGPC_ | The context handle (gpcDeleteGPC/gpcReset only). |
Return value. gpcNewGPC: a new context handle (never fails). gpcDeleteGPC/gpcReset: none.
See also. gpcAddVertex, gpcClipPoly.
C# (P/Invoke)
public static extern void gpcDeleteGPC(IntPtr IGPC_);
Polygon Clipper
gpcDeleteGPC
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.