API referenceGraphics

psrGetLineCapStyle

Read/write the line-cap sub-field (bits 8-9) of a

C
TLineCapStyle __stdcall psrGetLineCapStyle(uint32_t DrawParms);
void __stdcall psrSetLineCapStyle(uint32_t* DrawParms, TLineCapStyle Value);
Delphi
function psrGetLineCapStyle(DrawParms: Cardinal): TLineCapStyle; stdcall;
procedure psrSetLineCapStyle(var DrawParms: Cardinal; Value: TLineCapStyle); stdcall;

Purpose. Read/write the line-cap sub-field (bits 8-9) of a caller-owned packed DrawParms word.

Description. Same masked read-modify-write pattern as psrGetBlendMode/psrSetBlendMode, over bits 8-9 ((DrawParms shr 8) and 3 / clear-then-OR Value shl 8). TLineCapStyle is (csButtCap, csRoundCap, csSquareCap) — 3 values, ordinals 0..2, fitting the 2-bit field exactly.

Parameters.

ParameterDescription
DrawParms*(Get)* The packed word to read. *(Set)* var — modified in place; only bits 8-9 change.
Value*(Set only)* New TLineCapStyle ordinal (0..2).

Return value. psrGetLineCapStyle: the decoded TLineCapStyle. psrSetLineCapStyle: none.

See also. pdfGetLineCapStyle (the unrelated, document-level equivalent — do not confuse the two mechanisms).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern TLineCapStyle psrGetLineCapStyle(uint DrawParms);
Area
Graphics
Category

Misc

Exported names

psrGetLineCapStyle

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.