Krita Source Code Documentation
Loading...
Searching...
No Matches
LcmsColorSpaceFactory Class Reference

#include <LcmsColorSpace.h>

+ Inheritance diagram for LcmsColorSpaceFactory:

Public Member Functions

QList< KoColorConversionTransformationFactory * > colorConversionLinks () const override
 
QString colorSpaceEngine () const override
 
KoColorProfilecreateColorProfile (const QByteArray &rawData) const override
 
int crossingCost () const override
 
bool isHdr () const override
 
 LcmsColorSpaceFactory (cmsUInt32Number cmType, cmsColorSpaceSignature colorSpaceSignature)
 
bool profileIsCompatible (const KoColorProfile *profile) const override
 
- Public Member Functions inherited from KoColorSpaceFactory
virtual KoID colorDepthId () const =0
 
virtual KoID colorModelId () const =0
 
const KoColorProfilecolorProfile (const QByteArray &rawData, ProfileRegistrationInterface *registrationInterface) const
 
virtual QString defaultProfile () const =0
 
const KoColorSpacegrabColorSpace (const KoColorProfile *profile)
 
virtual QString id () const =0
 
virtual QString name () const =0
 
virtual int referenceDepth () const =0
 
virtual bool userVisible () const =0
 
virtual ~KoColorSpaceFactory ()
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Additional Inherited Members

- Public Attributes inherited from KoColorSpaceFactory
QHash< QString, KoColorSpace * > availableColorspaces
 
QList< KoColorProfile * > colorprofiles
 
QMutex mutex
 
QHash< KoColorSpace *, QString > stackInformation
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 
- Protected Member Functions inherited from KoColorSpaceFactory
virtual KoColorSpacecreateColorSpace (const KoColorProfile *) const =0
 
 KoColorSpaceFactory ()
 
- Private Member Functions inherited from KoLcmsInfo
virtual cmsColorSpaceSignature colorSpaceSignature () const
 
virtual quint32 colorSpaceType () const
 
 KoLcmsInfo (cmsUInt32Number cmType, cmsColorSpaceSignature colorSpaceSignature)
 
virtual ~KoLcmsInfo ()
 

Detailed Description

Base class for all LCMS based ColorSpace factories.

Definition at line 459 of file LcmsColorSpace.h.

Constructor & Destructor Documentation

◆ LcmsColorSpaceFactory()

LcmsColorSpaceFactory::LcmsColorSpaceFactory ( cmsUInt32Number cmType,
cmsColorSpaceSignature colorSpaceSignature )
inline

Definition at line 462 of file LcmsColorSpace.h.

464 {
465 }
virtual cmsColorSpaceSignature colorSpaceSignature() const
KoLcmsInfo(cmsUInt32Number cmType, cmsColorSpaceSignature colorSpaceSignature)

Member Function Documentation

◆ colorConversionLinks()

QList< KoColorConversionTransformationFactory * > LcmsColorSpaceFactory::colorConversionLinks ( ) const
overridevirtual
Returns
the list of color conversion provided by this colorspace, the factories constructed by this functions are owned by the caller of the function

Implements KoColorSpaceFactory.

Definition at line 19 of file LcmsColorSpace.cpp.

◆ colorSpaceEngine()

QString LcmsColorSpaceFactory::colorSpaceEngine ( ) const
inlineoverridevirtual
Returns
the name of the color space engine for this color space, or "" if none

Implements KoColorSpaceFactory.

Definition at line 473 of file LcmsColorSpace.h.

474 {
475 return "icc";
476 }

◆ createColorProfile()

KoColorProfile * LcmsColorSpaceFactory::createColorProfile ( const QByteArray & rawData) const
overridevirtual

Implements KoColorSpaceFactory.

Definition at line 24 of file LcmsColorSpace.cpp.

25{
26 return new IccColorProfile(rawData);
27}

◆ crossingCost()

int LcmsColorSpaceFactory::crossingCost ( ) const
inlineoverridevirtual
Returns
the cost of the usage of the colorspace in the conversion graph. The higher the cost, the less probably the color space will be chosen for the conversion.

Implements KoColorSpaceFactory.

Definition at line 483 of file LcmsColorSpace.h.

483 {
484 return 1;
485 }

◆ isHdr()

bool LcmsColorSpaceFactory::isHdr ( ) const
inlineoverridevirtual
Returns
true if the color space supports High-Dynamic Range.

Implements KoColorSpaceFactory.

Reimplemented in RgbF16ColorSpaceFactory, RgbF32ColorSpaceFactory, XyzF16ColorSpaceFactory, XyzF32ColorSpaceFactory, and YCbCrF32ColorSpaceFactory.

Definition at line 478 of file LcmsColorSpace.h.

479 {
480 return false;
481 }

◆ profileIsCompatible()

bool LcmsColorSpaceFactory::profileIsCompatible ( const KoColorProfile * profile) const
inlineoverridevirtual
Parameters
profilea pointer to a color profile
Returns
true if the color profile can be used by a color space created by this factory

Implements KoColorSpaceFactory.

Definition at line 467 of file LcmsColorSpace.h.

468 {
469 const IccColorProfile *p = dynamic_cast<const IccColorProfile *>(profile);
470 return (p && p->asLcms()->colorSpaceSignature() == colorSpaceSignature());
471 }
const Params2D p

References KoLcmsInfo::colorSpaceSignature(), and p.


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