Krita Source Code Documentation
Loading...
Searching...
No Matches
KoColorSpaceEngine Class Referenceabstract

#include <KoColorSpaceEngine.h>

+ Inheritance diagram for KoColorSpaceEngine:

Public Member Functions

virtual const KoColorProfileaddProfile (const QByteArray &data)=0
 
virtual const KoColorProfileaddProfile (const QString &filename)=0
 
virtual const KoColorProfilegetProfile (const QVector< double > &colorants, ColorPrimaries colorPrimaries, TransferCharacteristics transferFunction)=0
 getProfile This tries to generate a profile with the given characteristics and add it to the registry.
 
const QString & id () const
 
 KoColorSpaceEngine (const QString &id, const QString &name)
 
const QString & name () const
 
virtual void removeProfile (const QString &filename)=0
 
virtual bool supportsColorSpace (const QString &colorModelId, const QString &colorDepthId, const KoColorProfile *profile) const
 
 ~KoColorSpaceEngine () override
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 
- Public Member Functions inherited from KoColorConversionTransformationAbstractFactory
virtual KoColorProofingConversionTransformationcreateColorProofingTransformation (const KoColorSpace *srcColorSpace, const KoColorSpace *dstColorSpace, const KoColorSpace *proofingSpace, KoColorProofingConversionTransformation::Intent renderingIntent, KoColorProofingConversionTransformation::Intent proofingIntent, bool bpcFirstTransform, quint8 *gamutWarning, KoColorConversionTransformation::ConversionFlags displayConversionFlags) const
 
virtual KoColorConversionTransformationcreateColorTransformation (const KoColorSpace *srcColorSpace, const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent, KoColorConversionTransformation::ConversionFlags conversionFlags) const =0
 
 KoColorConversionTransformationAbstractFactory ()
 
virtual ~KoColorConversionTransformationAbstractFactory ()
 

Public Attributes

QString id
 
QString name
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Private Attributes

Private *const d
 

Detailed Description

A KoColorSpaceEngine is a class use to create color conversion transformation between color spaces, for which all profiles can output to all profiles.

Typically, when you have an ICC color space and color profile, you can convert to any other ICC color space and color profile. While creating a KoColorTransformationFactory for each of this transformation is possible, the number of links will make the Color Conversion explode System. KoColorSpaceEngine provides a virtual node in the Color Conversion System that can convert to any other node supported by the engine.

Definition at line 14 of file KoColorSpaceEngine.cpp.

Constructor & Destructor Documentation

◆ KoColorSpaceEngine()

KoColorSpaceEngine::KoColorSpaceEngine ( const QString & id,
const QString & name )

Definition at line 19 of file KoColorSpaceEngine.cpp.

19 : d(new Private)
20{
21 d->id = id;
22 d->name = name;
23}

References d, id, and name.

◆ ~KoColorSpaceEngine()

KoColorSpaceEngine::~KoColorSpaceEngine ( )
override

Definition at line 25 of file KoColorSpaceEngine.cpp.

26{
27 delete d;
28}

References d.

Member Function Documentation

◆ addProfile() [1/2]

virtual const KoColorProfile * KoColorSpaceEngine::addProfile ( const QByteArray & data)
pure virtual

◆ addProfile() [2/2]

virtual const KoColorProfile * KoColorSpaceEngine::addProfile ( const QString & filename)
pure virtual

◆ getProfile()

virtual const KoColorProfile * KoColorSpaceEngine::getProfile ( const QVector< double > & colorants,
ColorPrimaries colorPrimaries,
TransferCharacteristics transferFunction )
pure virtual

getProfile This tries to generate a profile with the given characteristics and add it to the registry.

Parameters
colorantsa double of xy (for xyY) values, this expects the first two as the white point, then the red, green and blue. Will only be used if primaries is unspecified. If there's only a whitepoint, a grayscale profile will be returned.
colorPrimariesthe color primaries type as defined in KoColorProfile.
transferFunctionthe transfer function, as defined in KoColorProfile.
Returns
a profile that matches these characteristics.

Implemented in KoSimpleColorSpaceEngine, and IccColorSpaceEngine.

◆ id()

const QString & KoColorSpaceEngine::id ( ) const

◆ name()

const QString & KoColorSpaceEngine::name ( ) const

◆ removeProfile()

virtual void KoColorSpaceEngine::removeProfile ( const QString & filename)
pure virtual

◆ supportsColorSpace()

bool KoColorSpaceEngine::supportsColorSpace ( const QString & colorModelId,
const QString & colorDepthId,
const KoColorProfile * profile ) const
virtual
Returns
true if the color space can be converted via this engine

Reimplemented in IccColorSpaceEngine.

Definition at line 40 of file KoColorSpaceEngine.cpp.

41{
42 Q_UNUSED(colorModelId);
43 Q_UNUSED(colorDepthId);
44 Q_UNUSED(profile);
45
46 return true;
47}

Member Data Documentation

◆ d

Private* const KoColorSpaceEngine::d
private

Definition at line 58 of file KoColorSpaceEngine.h.

◆ id

const QString & KoColorSpaceEngine::id

Definition at line 15 of file KoColorSpaceEngine.cpp.

◆ name

const QString & KoColorSpaceEngine::name

Definition at line 16 of file KoColorSpaceEngine.cpp.


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