API referenceGraphics

pdfHaveOpenPath

Inspect and discard the current path under construction.

C
BOOL32 __stdcall pdfAbortPath(PPDF IPDF);
BOOL32 __stdcall pdfHaveOpenPath(PPDF IPDF);
Delphi
function pdfAbortPath(const IPDF: PPDF): LongBool; stdcall;
function pdfHaveOpenPath(const IPDF: PPDF): LongBool; stdcall;

Purpose. Inspect and discard the current path under construction.

Description. A path is "open" from the first pdfMoveTo / pdfAddArc-style segment until a paint or clip operator (pdfStrokePath, pdfFillPath, pdfClipPath, ...) consumes it. pdfHaveOpenPath reports that state. pdfAbortPath throws the pending segments away without emitting anything into the content stream — the way out when path construction is abandoned mid-way (a cancelled drawing operation, an error path in the host application). Aborting when no path is open is a harmless no-op.

Parameters.

ParameterDescription
IPDFDocument handle.

Return value. pdfHaveOpenPath: True while path segments are pending. pdfAbortPath: True once any pending path is discarded.

See also. pdfMoveTo, pdfLineTo, pdfStrokePath, pdfClipPath.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Graphics
Category

Core

Exported names

pdfHaveOpenPath

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.