double __stdcall pdfGetLineWidth(PPDF IPDF);
BOOL32 __stdcall pdfSetLineWidth(PPDF IPDF, double Value);
function pdfGetLineWidth(const IPDF: PPDF): Double; stdcall;
function pdfSetLineWidth(const IPDF: PPDF; Value: Double): LongBool; stdcall;
Purpose. Set/get the current stroke line width, in user-space units (points, absent a scaling CTM).
Description. Caches into FCurLineWidth and emits a w line-width operator via WriteLineWidth immediately — real, same pattern as cap/join. No range clamping is applied (unlike pdfSetOpacity below); a negative or zero width is passed through to the content stream unmodified, at the PDF viewer's discretion to interpret (0 conventionally renders a device-thinnest line).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Value | Line width in user-space units; not validated. |
Return value. pdfSetLineWidth: True on success, False if no current content stream. pdfGetLineWidth: the cached current width; 0.0 if IPDF is invalid.
See also. pdfSetLineDashPattern2.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetLineWidth
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.