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

#include <cpdf_function.h>

+ Inheritance diagram for CPDF_Function:
+ Collaboration diagram for CPDF_Function:

Public Types

enum class  Type {
  kTypeInvalid = -1 , kType0Sampled = 0 , kType2ExponentialInterpolation = 2 , kType3Stitching = 3 ,
  kType4PostScript = 4
}
 

Public Member Functions

virtual ~CPDF_Function ()
 
absl::optional< uint32_t > Call (pdfium::span< const float > inputs, pdfium::span< float > results) const
 
uint32_t CountInputs () const
 
uint32_t CountOutputs () const
 
float GetDomain (int i) const
 
float GetRange (int i) const
 
float Interpolate (float x, float xmin, float xmax, float ymin, float ymax) const
 

Static Public Member Functions

static std::unique_ptr< CPDF_FunctionLoad (RetainPtr< const CPDF_Object > pFuncObj)
 

Protected Types

using VisitedSet = std::set<RetainPtr<const CPDF_Object>>
 

Protected Member Functions

 CPDF_Function (Type type)
 
bool Init (const CPDF_Object *pObj, VisitedSet *pVisited)
 
virtual bool v_Init (const CPDF_Object *pObj, VisitedSet *pVisited)=0
 
virtual bool v_Call (pdfium::span< const float > inputs, pdfium::span< float > results) const =0
 

Static Protected Member Functions

static std::unique_ptr< CPDF_FunctionLoad (RetainPtr< const CPDF_Object > pFuncObj, VisitedSet *pVisited)
 

Protected Attributes

const Type m_Type
 
uint32_t m_nInputs = 0
 
uint32_t m_nOutputs = 0
 
std::vector< float > m_Domains
 
std::vector< float > m_Ranges
 

Detailed Description

Definition at line 23 of file cpdf_function.h.

Member Typedef Documentation

◆ VisitedSet

using CPDF_Function::VisitedSet = std::set<RetainPtr<const CPDF_Object>>
protected

Definition at line 60 of file cpdf_function.h.

Member Enumeration Documentation

◆ Type

enum class CPDF_Function::Type
strong
Enumerator
kTypeInvalid 
kType0Sampled 
kType2ExponentialInterpolation 
kType3Stitching 
kType4PostScript 

Definition at line 26 of file cpdf_function.h.

Constructor & Destructor Documentation

◆ ~CPDF_Function()

CPDF_Function::~CPDF_Function ( )
virtualdefault

◆ CPDF_Function()

CPDF_Function::CPDF_Function ( Type type)
explicitprotected

Definition at line 84 of file cpdf_function.cpp.

References m_Type.

Referenced by CPDF_ExpIntFunc::CPDF_ExpIntFunc(), CPDF_PSFunc::CPDF_PSFunc(), CPDF_SampledFunc::CPDF_SampledFunc(), and CPDF_StitchFunc::CPDF_StitchFunc().

+ Here is the caller graph for this function:

Member Function Documentation

◆ Call()

absl::optional< uint32_t > CPDF_Function::Call ( pdfium::span< const float > inputs,
pdfium::span< float > results ) const

Definition at line 131 of file cpdf_function.cpp.

References m_nInputs, and m_nOutputs.

◆ CountInputs()

uint32_t CPDF_Function::CountInputs ( ) const
inline

Definition at line 41 of file cpdf_function.h.

References m_nInputs.

◆ CountOutputs()

uint32_t CPDF_Function::CountOutputs ( ) const
inline

Definition at line 42 of file cpdf_function.h.

References m_nOutputs.

◆ GetDomain()

float CPDF_Function::GetDomain ( int i) const
inline

Definition at line 43 of file cpdf_function.h.

◆ GetRange()

float CPDF_Function::GetRange ( int i) const
inline

Definition at line 44 of file cpdf_function.h.

◆ Init()

bool CPDF_Function::Init ( const CPDF_Object * pObj,
VisitedSet * pVisited )
protected

Definition at line 88 of file cpdf_function.cpp.

References CPDF_Object::AsStream(), kType0Sampled, kType4PostScript, m_nInputs, m_nOutputs, and m_Type.

+ Here is the call graph for this function:

◆ Interpolate()

float CPDF_Function::Interpolate ( float x,
float xmin,
float xmax,
float ymin,
float ymax ) const

Definition at line 164 of file cpdf_function.cpp.

◆ Load() [1/2]

std::unique_ptr< CPDF_Function > CPDF_Function::Load ( RetainPtr< const CPDF_Object > pFuncObj)
static

Definition at line 43 of file cpdf_function.cpp.

◆ Load() [2/2]

std::unique_ptr< CPDF_Function > CPDF_Function::Load ( RetainPtr< const CPDF_Object > pFuncObj,
VisitedSet * pVisited )
staticprotected

Definition at line 50 of file cpdf_function.cpp.

References CPDF_Object::GetDict(), CPDF_Dictionary::GetIntegerFor(), kType0Sampled, kType2ExponentialInterpolation, kType3Stitching, and kType4PostScript.

+ Here is the call graph for this function:

◆ v_Call()

virtual bool CPDF_Function::v_Call ( pdfium::span< const float > inputs,
pdfium::span< float > results ) const
protectedpure virtual

◆ v_Init()

virtual bool CPDF_Function::v_Init ( const CPDF_Object * pObj,
VisitedSet * pVisited )
protectedpure virtual

Member Data Documentation

◆ m_Domains

std::vector<float> CPDF_Function::m_Domains
protected

Definition at line 72 of file cpdf_function.h.

◆ m_nInputs

uint32_t CPDF_Function::m_nInputs = 0
protected

◆ m_nOutputs

uint32_t CPDF_Function::m_nOutputs = 0
protected

◆ m_Ranges

std::vector<float> CPDF_Function::m_Ranges
protected

Definition at line 73 of file cpdf_function.h.

◆ m_Type

const Type CPDF_Function::m_Type
protected

Definition at line 69 of file cpdf_function.h.

Referenced by CPDF_Function(), and Init().


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