14using PdfColorRaw = std::array<double, 6>;
76 bool IsGrayScale()
const;
90 bool IsTransparent()
const;
107 double GetGrayScale()
const;
118 double GetRed()
const;
129 double GetGreen()
const;
140 double GetBlue()
const;
151 double GetCyan()
const;
162 double GetMagenta()
const;
173 double GetYellow()
const;
184 double GetBlack()
const;
196 PdfColor ConvertToGrayScale()
const;
239 static PdfColor CreateFromString(
const std::string_view& name);
242 unsigned char GetComponentCount()
const {
return m_ComponentCount; }
244 const PdfColorRaw& GetRawColor()
const {
return m_RawColor; }
276 bool m_IsTransparent;
278 unsigned char m_ComponentCount;
279 PdfColorRaw m_RawColor;
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:23
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:96
This class represents a PDF indirect Object in memory.
Definition PdfObject.h:35
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition basetypes.h:38
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:359