API referenceGraphics

pdfGetFillColor

Return the last packed fill (resp. stroke) color value set via

C
uint32_t __stdcall pdfGetFillColor(PPDF IPDF);
uint32_t __stdcall pdfGetStrokeColor(PPDF IPDF);
Delphi
function pdfGetFillColor(const IPDF: PPDF): Cardinal; stdcall;
function pdfGetStrokeColor(const IPDF: PPDF): Cardinal; stdcall;

Purpose. Return the last packed fill (resp. stroke) color value set via pdfSetFillColor/pdfSetColors (resp. the stroke equivalents).

Description. Returns the document's cached "current" packed color value (GetFillColorCur/GetStrokeColorCur) — the same representation pdfSetFillColor/pdfSetStrokeColor accept. This tracks only the single-packed-value entry points; colors set via the byte-array (*Ex) or float-array (*F) variants are not reflected back through a packed-value getter, since those variants operate in a different component space (there is no packed-value round-trip for an arbitrary N-component DeviceN/Separation tint).

Parameters.

ParameterDescription
IPDFDocument handle.

Return value. The current packed fill (resp. stroke) color; 0 if IPDF is invalid.

See also. pdfSetFillColor.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern uint pdfGetFillColor(IntPtr IPDF);
Area
Graphics
Category

Getters

Exported names

pdfGetFillColor

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.