pdfSetStrokeColorF
Set the fill (resp. stroke) color from a float array, each
BOOL32 __stdcall pdfSetFillColorF(PPDF IPDF, float* Color, uint32_t NumComponents);
BOOL32 __stdcall pdfSetStrokeColorF(PPDF IPDF, float* Color, uint32_t NumComponents);
function pdfSetFillColorF(const IPDF: PPDF; Color: PSingle; NumComponents: Cardinal): LongBool; stdcall;
function pdfSetStrokeColorF(const IPDF: PPDF; Color: PSingle; NumComponents: Cardinal): LongBool; stdcall;
Purpose. Set the fill (resp. stroke) color from a float array, each component already normalized to 0.0..1.0.
Description. Identical to pdfSetFillColorEx/pdfSetStrokeColorEx in every respect except that the NumComponents values read from Color are Single floats already in 0.0..1.0 and are passed through to EmitColorComps without the /255.0 normalization the Ex variant applies. Passing a byte-range value (e.g. 255.0) here will saturate/clip rather than normalize — the two entry points are not interchangeable despite accepting the same component count.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Color | Pointer to NumComponents floats, each 0.0..1.0. |
NumComponents | Number of color components. |
Return value. True on success; False if there is no current content stream.
See also. pdfSetFillColorEx (byte/255 variant).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetStrokeColorF
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.