int32_t __stdcall pdfGetLineCapStyle(PPDF IPDF);
BOOL32 __stdcall pdfSetLineCapStyle(PPDF IPDF, int32_t Style);
function pdfGetLineCapStyle(const IPDF: PPDF): Integer; stdcall;
function pdfSetLineCapStyle(const IPDF: PPDF; Style: Integer): LongBool; stdcall;
Purpose. Set/get the current line-cap style (TLineCapStyle: 0=Butt, 1=Round, 2=Square) applied to subsequently stroked paths.
Description. pdfSetLineCapStyle both caches Style into FCurLineCap (so pdfGetLineCapStyle can read it back) and immediately emits a J line-cap operator into the current content stream via WriteLineCap — unlike the "write-only" state fields found elsewhere in this SDK, this one is genuinely real and takes effect on the very next stroke. Requires an open current content stream; fails if none is active.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Style | 0=Butt cap, 1=Round cap, 2=Square cap. |
Return value. pdfSetLineCapStyle: True on success, False if no current content stream. pdfGetLineCapStyle: the cached current style; 0 if IPDF is invalid.
See also. pdfGetLineJoinStyle, psrGetLineCapStyle (unrelated packed-bitfield mechanism, do not confuse).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetLineCapStyle
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.