TLineCapStyle __stdcall psrGetLineCapStyle(uint32_t DrawParms);
void __stdcall psrSetLineCapStyle(uint32_t* DrawParms, TLineCapStyle Value);
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.
| Parameter | Description |
|---|---|
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)
public static extern void psrSetLineCapStyle(ref uint DrawParms, TLineCapStyle Value);
Misc
psrSetLineCapStyle
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.