16 using PdfColorRaw = std::array<double, 6>;
45 PdfColor(
double red,
double green,
double blue);
55 PdfColor(
double cyan,
double magenta,
double yellow,
double black);
78 bool IsGrayScale()
const;
92 bool IsTransparent()
const;
109 double GetGrayScale()
const;
120 double GetRed()
const;
131 double GetGreen()
const;
142 double GetBlue()
const;
153 double GetCyan()
const;
164 double GetMagenta()
const;
175 double GetYellow()
const;
186 double GetBlack()
const;
198 PdfColor ConvertToGrayScale()
const;
241 static PdfColor CreateFromString(
const std::string_view& name);
244 unsigned char GetComponentCount()
const {
return m_ComponentCount; }
246 const PdfColorRaw& GetRawColor()
const {
return m_RawColor; }
262 bool operator==(
const PdfColor& rhs)
const;
270 bool operator!=(
const PdfColor& rhs)
const;
278 bool m_IsTransparent;
280 unsigned char m_ComponentCount;
281 PdfColorRaw m_RawColor;
SPDX-FileCopyrightText: (C) 2005 Dominik Seichter domseichter@web.de SPDX-FileCopyrightText: (C) 2020...
This class represents a PdfArray Use it for all arrays that are written to a PDF file.
Definition: PdfArray.h:81
A color object can represent either a grayscale value, a RGB color, a CMYK color.
Definition: PdfColor.h:25
PdfColor & operator=(const PdfColor &rhs)=default
Assignment operator.
PdfColor(const PdfColor &rhs)=default
Copy constructor.
PdfColorSpaceType GetColorSpace() const
Get the colorspace of this PdfColor object.
Definition: PdfColor.h:98
This class represents a PDF indirect Object in memory.
Definition: PdfObject.h:35
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition: basetypes.h:16
PdfColorSpaceType
Enum for the colorspaces supported by PDF.
Definition: PdfDeclarations.h:330