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_ColorSpace Class Referenceabstract

#include <cpdf_colorspace.h>

+ Inheritance diagram for CPDF_ColorSpace:
+ Collaboration diagram for CPDF_ColorSpace:

Public Types

enum class  Family {
  kUnknown = 0 , kDeviceGray = 1 , kDeviceRGB = 2 , kDeviceCMYK = 3 ,
  kCalGray = 4 , kCalRGB = 5 , kLab = 6 , kICCBased = 7 ,
  kSeparation = 8 , kDeviceN = 9 , kIndexed = 10 , kPattern = 11
}
 

Public Member Functions

std::vector< float > CreateBufAndSetDefaultColor () const
 
uint32_t CountComponents () const
 
Family GetFamily () const
 
bool IsSpecial () const
 
virtual bool GetRGB (pdfium::span< const float > pBuf, float *R, float *G, float *B) const =0
 
virtual void GetDefaultValue (int iComponent, float *value, float *min, float *max) const
 
virtual void TranslateImageLine (pdfium::span< uint8_t > dest_span, pdfium::span< const uint8_t > src_span, int pixels, int image_width, int image_height, bool bTransMask) const
 
virtual void EnableStdConversion (bool bEnabled)
 
virtual bool IsNormal () const
 
virtual const CPDF_PatternCSAsPatternCS () const
 
virtual const CPDF_IndexedCSAsIndexedCS () const
 
- Public Member Functions inherited from fxcrt::Retainable
 Retainable ()=default
 
bool HasOneRef () const
 
- Public Member Functions inherited from fxcrt::Observable
 Observable ()
 
 Observable (const Observable &that)=delete
 
Observableoperator= (const Observable &that)=delete
 
 ~Observable ()
 
void AddObserver (ObserverIface *pObserver)
 
void RemoveObserver (ObserverIface *pObserver)
 
void NotifyObservers ()
 

Static Public Member Functions

static void InitializeGlobals ()
 
static void DestroyGlobals ()
 
static RetainPtr< CPDF_ColorSpaceGetStockCS (Family family)
 
static RetainPtr< CPDF_ColorSpaceGetStockCSForName (const ByteString &name)
 
static RetainPtr< CPDF_ColorSpaceLoad (CPDF_Document *pDoc, const CPDF_Object *pObj, std::set< const CPDF_Object * > *pVisited)
 
static RetainPtr< CPDF_ColorSpaceAllocateColorSpaceForID (CPDF_Document *pDocument, uint32_t family_id)
 
static uint32_t ComponentsForFamily (Family family)
 

Protected Member Functions

 CPDF_ColorSpace (Family family)
 
 ~CPDF_ColorSpace () override
 
virtual uint32_t v_Load (CPDF_Document *pDoc, const CPDF_Array *pArray, std::set< const CPDF_Object * > *pVisited)=0
 
void SetComponentsForStockCS (uint32_t nComponents)
 
bool IsStdConversionEnabled () const
 
bool HasSameArray (const CPDF_Object *pObj) const
 
- Protected Member Functions inherited from fxcrt::Retainable
virtual ~Retainable ()=default
 
- Protected Member Functions inherited from fxcrt::Observable
size_t ActiveObserversForTesting () const
 

Friends

class CPDF_CalGray_TranslateImageLine_Test
 
class CPDF_CalRGB_TranslateImageLine_Test
 

Detailed Description

Definition at line 55 of file cpdf_colorspace.h.

Member Enumeration Documentation

◆ Family

enum class CPDF_ColorSpace::Family
strong
Enumerator
kUnknown 
kDeviceGray 
kDeviceRGB 
kDeviceCMYK 
kCalGray 
kCalRGB 
kLab 
kICCBased 
kSeparation 
kDeviceN 
kIndexed 
kPattern 

Definition at line 57 of file cpdf_colorspace.h.

Constructor & Destructor Documentation

◆ CPDF_ColorSpace()

CPDF_ColorSpace::CPDF_ColorSpace ( Family family)
explicitprotected

Definition at line 679 of file cpdf_colorspace.cpp.

Referenced by CPDF_BasedCS::CPDF_BasedCS().

+ Here is the caller graph for this function:

◆ ~CPDF_ColorSpace()

CPDF_ColorSpace::~CPDF_ColorSpace ( )
overrideprotecteddefault

Member Function Documentation

◆ AllocateColorSpaceForID()

static RetainPtr< CPDF_ColorSpace > CPDF_ColorSpace::AllocateColorSpaceForID ( CPDF_Document * pDocument,
uint32_t family_id )
static

◆ AsIndexedCS()

const CPDF_IndexedCS * CPDF_ColorSpace::AsIndexedCS ( ) const
virtual

Reimplemented in CPDF_IndexedCS.

Definition at line 675 of file cpdf_colorspace.cpp.

◆ AsPatternCS()

const CPDF_PatternCS * CPDF_ColorSpace::AsPatternCS ( ) const
virtual

Reimplemented in CPDF_PatternCS.

Definition at line 671 of file cpdf_colorspace.cpp.

◆ ComponentsForFamily()

uint32_t CPDF_ColorSpace::ComponentsForFamily ( Family family)
static

Definition at line 596 of file cpdf_colorspace.cpp.

References kDeviceCMYK, kDeviceGray, and kDeviceRGB.

◆ CountComponents()

uint32_t CPDF_ColorSpace::CountComponents ( ) const

Definition at line 621 of file cpdf_colorspace.cpp.

◆ CreateBufAndSetDefaultColor()

std::vector< float > CPDF_ColorSpace::CreateBufAndSetDefaultColor ( ) const

Definition at line 609 of file cpdf_colorspace.cpp.

References GetDefaultValue().

+ Here is the call graph for this function:

◆ DestroyGlobals()

void CPDF_ColorSpace::DestroyGlobals ( )
static

Definition at line 486 of file cpdf_colorspace.cpp.

Referenced by CPDF_PageModule::Destroy().

+ Here is the caller graph for this function:

◆ EnableStdConversion()

void CPDF_ColorSpace::EnableStdConversion ( bool bEnabled)
virtual

Reimplemented in CPDF_BasedCS.

Definition at line 657 of file cpdf_colorspace.cpp.

Referenced by CPDF_BasedCS::EnableStdConversion().

+ Here is the caller graph for this function:

◆ GetDefaultValue()

void CPDF_ColorSpace::GetDefaultValue ( int iComponent,
float * value,
float * min,
float * max ) const
virtual

Definition at line 625 of file cpdf_colorspace.cpp.

Referenced by CreateBufAndSetDefaultColor().

+ Here is the caller graph for this function:

◆ GetFamily()

Family CPDF_ColorSpace::GetFamily ( ) const
inline

Definition at line 97 of file cpdf_colorspace.h.

Referenced by CPDF_DeviceCS::GetRGB(), IsNormal(), IsSpecial(), and CPDF_DeviceCS::TranslateImageLine().

+ Here is the caller graph for this function:

◆ GetRGB()

virtual bool CPDF_ColorSpace::GetRGB ( pdfium::span< const float > pBuf,
float * R,
float * G,
float * B ) const
pure virtual

Implemented in CPDF_DeviceCS, CPDF_IndexedCS, and CPDF_PatternCS.

Referenced by TranslateImageLine().

+ Here is the caller graph for this function:

◆ GetStockCS()

RetainPtr< CPDF_ColorSpace > CPDF_ColorSpace::GetStockCS ( Family family)
static

Definition at line 492 of file cpdf_colorspace.cpp.

Referenced by FPDFPageObj_SetFillColor(), FPDFPageObj_SetStrokeColor(), and CPDF_Color::SetValueForPattern().

+ Here is the caller graph for this function:

◆ GetStockCSForName()

RetainPtr< CPDF_ColorSpace > CPDF_ColorSpace::GetStockCSForName ( const ByteString & name)
static

Definition at line 497 of file cpdf_colorspace.cpp.

References kDeviceCMYK, kDeviceGray, kDeviceRGB, kPattern, and fxcrt::ByteString::operator==().

+ Here is the call graph for this function:

◆ HasSameArray()

bool CPDF_ColorSpace::HasSameArray ( const CPDF_Object * pObj) const
inlineprotected

Definition at line 144 of file cpdf_colorspace.h.

Referenced by CPDF_IndexedCS::v_Load(), and CPDF_PatternCS::v_Load().

+ Here is the caller graph for this function:

◆ InitializeGlobals()

void CPDF_ColorSpace::InitializeGlobals ( )
static

Definition at line 480 of file cpdf_colorspace.cpp.

Referenced by CPDF_PageModule::Create().

+ Here is the caller graph for this function:

◆ IsNormal()

bool CPDF_ColorSpace::IsNormal ( ) const
virtual

Definition at line 664 of file cpdf_colorspace.cpp.

References GetFamily(), kCalGray, kCalRGB, kDeviceCMYK, kDeviceGray, and kDeviceRGB.

+ Here is the call graph for this function:

◆ IsSpecial()

bool CPDF_ColorSpace::IsSpecial ( ) const
inline

Definition at line 98 of file cpdf_colorspace.h.

References GetFamily(), kDeviceN, kIndexed, kPattern, and kSeparation.

+ Here is the call graph for this function:

◆ IsStdConversionEnabled()

bool CPDF_ColorSpace::IsStdConversionEnabled ( ) const
inlineprotected

Definition at line 143 of file cpdf_colorspace.h.

Referenced by CPDF_DeviceCS::GetRGB(), and CPDF_DeviceCS::TranslateImageLine().

+ Here is the caller graph for this function:

◆ Load()

RetainPtr< CPDF_ColorSpace > CPDF_ColorSpace::Load ( CPDF_Document * pDoc,
const CPDF_Object * pObj,
std::set< const CPDF_Object * > * pVisited )
static

Definition at line 511 of file cpdf_colorspace.cpp.

References CPDF_Object::AsArray(), CPDF_Object::AsStream(), CPDF_Object::GetString(), CPDF_Array::IsEmpty(), and CPDF_Object::IsName().

+ Here is the call graph for this function:

◆ SetComponentsForStockCS()

void CPDF_ColorSpace::SetComponentsForStockCS ( uint32_t nComponents)
protected

Definition at line 683 of file cpdf_colorspace.cpp.

Referenced by CPDF_PatternCS::InitializeStockPattern().

+ Here is the caller graph for this function:

◆ TranslateImageLine()

void CPDF_ColorSpace::TranslateImageLine ( pdfium::span< uint8_t > dest_span,
pdfium::span< const uint8_t > src_span,
int pixels,
int image_width,
int image_height,
bool bTransMask ) const
virtual

Reimplemented in CPDF_DeviceCS.

Definition at line 634 of file cpdf_colorspace.cpp.

References GetRGB(), and kIndexed.

+ Here is the call graph for this function:

◆ v_Load()

virtual uint32_t CPDF_ColorSpace::v_Load ( CPDF_Document * pDoc,
const CPDF_Array * pArray,
std::set< const CPDF_Object * > * pVisited )
protectedpure virtual

Friends And Related Symbol Documentation

◆ CPDF_CalGray_TranslateImageLine_Test

friend class CPDF_CalGray_TranslateImageLine_Test
friend

Definition at line 147 of file cpdf_colorspace.h.

◆ CPDF_CalRGB_TranslateImageLine_Test

friend class CPDF_CalRGB_TranslateImageLine_Test
friend

Definition at line 148 of file cpdf_colorspace.h.


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