API referenceGraphics

pdfStrokePath

Stroke the current manually-built path (S operator).

CategoryPath painting
Notehas a real precondition, unlike pdfClosePath (see Remarks)

Purpose — Stroke the current manually-built path (S operator).

Declarations

C
BOOL32 __stdcall pdfStrokePath(PPDF IPDF);
Delphi
function pdfStrokePath(const IPDF: PPDF): LongBool; stdcall; external 'LumasPdf.dll';

Return valueTRUE on success; FALSE if no path has been started (pdfMoveTo/pdfRectangle/etc. never called since the page opened) — stroking with no current path is treated as an error, matching LumasPDF behavior.

Remarks — Note the asymmetry with pdfClosePath, which has no such precondition check — pdfClosePath will happily emit a paint operator even with no path started (producing a no-op paint on an empty path), while pdfStrokePath explicitly refuses.

C# (P/Invoke)

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

Core

Exported names

pdfStrokePath

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.