BOOL32 __stdcall pdfSetColors(PPDF IPDF, uint32_t Color);
function pdfSetColors(const IPDF: PPDF; Color: Cardinal): LongBool; stdcall;
Purpose. Convenience call that sets both the fill and stroke color from the same packed value in one call.
Description. Equivalent to calling pdfSetFillColor(IPDF, Color) followed by pdfSetStrokeColor(IPDF, Color), except it is one content-stream write of two color operators instead of two separate API calls: emits a fill-color operator against FFillCS and a stroke-color operator against FStrokeCS, both using Color. FFillCS and FStrokeCS may differ (e.g. after using pdfSetFillColorSpace/pdfSetStrokeColorSpace independently), in which case the same packed Color value is interpreted twice, once against each active space.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Color | Packed color value applied to both fill and stroke. |
Return value. True on success; False if there is no current content stream.
See also. pdfSetFillColor, pdfSetStrokeColor.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetColors
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.