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 ComponentCount () const
Family GetFamily () const
bool IsSpecial () const
FX_RGB_STRUCT< float > GetRGBOrZerosOnError (pdfium::span< const float > pBuf) const
virtual std::optional< FX_RGB_STRUCT< float > > GetRGB (pdfium::span< const float > pBuf) 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 53 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 55 of file cpdf_colorspace.h.

Constructor & Destructor Documentation

◆ CPDF_ColorSpace()

CPDF_ColorSpace::CPDF_ColorSpace ( Family family)
explicitprotected

Definition at line 663 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()

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 659 of file cpdf_colorspace.cpp.

◆ AsPatternCS()

const CPDF_PatternCS * CPDF_ColorSpace::AsPatternCS ( ) const
virtual

Reimplemented in CPDF_PatternCS.

Definition at line 655 of file cpdf_colorspace.cpp.

◆ ComponentCount()

uint32_t CPDF_ColorSpace::ComponentCount ( ) const

Definition at line 601 of file cpdf_colorspace.cpp.

◆ ComponentsForFamily()

uint32_t CPDF_ColorSpace::ComponentsForFamily ( Family family)
static

Definition at line 576 of file cpdf_colorspace.cpp.

References kDeviceCMYK, kDeviceGray, and kDeviceRGB.

◆ CreateBufAndSetDefaultColor()

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

Definition at line 589 of file cpdf_colorspace.cpp.

References GetDefaultValue().

Here is the call graph for this function:

◆ DestroyGlobals()

void CPDF_ColorSpace::DestroyGlobals ( )
static

Definition at line 469 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 641 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 605 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 95 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 std::optional< FX_RGB_STRUCT< float > > CPDF_ColorSpace::GetRGB ( pdfium::span< const float > pBuf) const
pure virtual

◆ GetRGBOrZerosOnError()

FX_RGB_STRUCT< float > CPDF_ColorSpace::GetRGBOrZerosOnError ( pdfium::span< const float > pBuf) const
inline

Definition at line 104 of file cpdf_colorspace.h.

◆ GetStockCS()

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

Definition at line 475 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 480 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 147 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 463 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 648 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 96 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 146 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 494 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 667 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 614 of file cpdf_colorspace.cpp.

References kIndexed.

◆ v_Load()

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

◆ CPDF_CalGray_TranslateImageLine_Test

friend class CPDF_CalGray_TranslateImageLine_Test
friend

Definition at line 150 of file cpdf_colorspace.h.

◆ CPDF_CalRGB_TranslateImageLine_Test

friend class CPDF_CalRGB_TranslateImageLine_Test
friend

Definition at line 151 of file cpdf_colorspace.h.


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