Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CPDF_Color Class Reference

#include <cpdf_color.h>

Collaboration diagram for CPDF_Color:

Public Member Functions

 CPDF_Color ()
 CPDF_Color (const CPDF_Color &that)
 ~CPDF_Color ()
CPDF_Coloroperator= (const CPDF_Color &that)
bool IsNull () const
bool IsPattern () const
void SetColorSpace (RetainPtr< CPDF_ColorSpace > colorspace)
void SetValueForNonPattern (std::vector< float > values)
void SetValueForPattern (RetainPtr< CPDF_Pattern > pattern, pdfium::span< float > values)
uint32_t ComponentCount () const
bool IsColorSpaceRGB () const
bool IsColorSpaceGray () const
std::optional< FX_COLORREFGetColorRef () const
std::optional< FX_RGB_STRUCT< float > > GetRGB () const
RetainPtr< CPDF_PatternGetPattern () const

Protected Member Functions

bool IsPatternInternal () const

Protected Attributes

absl::variant< absl::monostate, std::vector< float >, std::unique_ptr< PatternValue > > color_data_
RetainPtr< CPDF_ColorSpacecs_

Detailed Description

Definition at line 25 of file cpdf_color.h.

Constructor & Destructor Documentation

◆ CPDF_Color() [1/2]

CPDF_Color::CPDF_Color ( )
default

◆ CPDF_Color() [2/2]

CPDF_Color::CPDF_Color ( const CPDF_Color & that)

Definition at line 18 of file cpdf_color.cpp.

References operator=().

Here is the call graph for this function:

◆ ~CPDF_Color()

CPDF_Color::~CPDF_Color ( )
default

Member Function Documentation

◆ ComponentCount()

uint32_t CPDF_Color::ComponentCount ( ) const

Definition at line 88 of file cpdf_color.cpp.

◆ GetColorRef()

std::optional< FX_COLORREF > CPDF_Color::GetColorRef ( ) const

Definition at line 102 of file cpdf_color.cpp.

References FXSYS_BGR(), and FXSYS_roundf().

Here is the call graph for this function:

◆ GetPattern()

RetainPtr< CPDF_Pattern > CPDF_Color::GetPattern ( ) const

Definition at line 131 of file cpdf_color.cpp.

◆ GetRGB()

std::optional< FX_RGB_STRUCT< float > > CPDF_Color::GetRGB ( ) const

Definition at line 115 of file cpdf_color.cpp.

References IsPatternInternal().

Here is the call graph for this function:

◆ IsColorSpaceGray()

bool CPDF_Color::IsColorSpaceGray ( ) const

Definition at line 97 of file cpdf_color.cpp.

◆ IsColorSpaceRGB()

bool CPDF_Color::IsColorSpaceRGB ( ) const

Definition at line 92 of file cpdf_color.cpp.

◆ IsNull()

bool CPDF_Color::IsNull ( ) const

Definition at line 24 of file cpdf_color.cpp.

Referenced by CPDF_RenderStatus::CloneObjStates(), CPDF_ColorState::HasFillColor(), and CPDF_ColorState::HasStrokeColor().

Here is the caller graph for this function:

◆ IsPattern()

bool CPDF_Color::IsPattern ( ) const

Definition at line 28 of file cpdf_color.cpp.

Referenced by SetValueForPattern().

Here is the caller graph for this function:

◆ IsPatternInternal()

bool CPDF_Color::IsPatternInternal ( ) const
protected

Definition at line 32 of file cpdf_color.cpp.

Referenced by GetRGB(), SetColorSpace(), and SetValueForNonPattern().

Here is the caller graph for this function:

◆ operator=()

CPDF_Color & CPDF_Color::operator= ( const CPDF_Color & that)

Definition at line 67 of file cpdf_color.cpp.

Referenced by CPDF_Color().

Here is the caller graph for this function:

◆ SetColorSpace()

void CPDF_Color::SetColorSpace ( RetainPtr< CPDF_ColorSpace > colorspace)

Definition at line 36 of file cpdf_color.cpp.

References IsPatternInternal().

Referenced by SetValueForPattern().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetValueForNonPattern()

void CPDF_Color::SetValueForNonPattern ( std::vector< float > values)

Definition at line 45 of file cpdf_color.cpp.

References IsPatternInternal().

Here is the call graph for this function:

◆ SetValueForPattern()

void CPDF_Color::SetValueForPattern ( RetainPtr< CPDF_Pattern > pattern,
pdfium::span< float > values )

Definition at line 51 of file cpdf_color.cpp.

References CPDF_ColorSpace::GetStockCS(), IsPattern(), CPDF_ColorSpace::kPattern, and SetColorSpace().

Here is the call graph for this function:

Member Data Documentation

◆ color_data_

absl::variant<absl::monostate, std::vector<float>, std::unique_ptr<PatternValue> > CPDF_Color::color_data_
protected

Definition at line 59 of file cpdf_color.h.

◆ cs_

RetainPtr<CPDF_ColorSpace> CPDF_Color::cs_
protected

Definition at line 60 of file cpdf_color.h.


The documentation for this class was generated from the following files: