Krita Source Code Documentation
Loading...
Searching...
No Matches
KoAlphaColorSpaceFactoryImpl< _CSTrait > Class Template Reference

#include <KoAlphaColorSpace.h>

+ Inheritance diagram for KoAlphaColorSpaceFactoryImpl< _CSTrait >:

Public Member Functions

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

Private Types

typedef _CSTrait::channels_type channels_type
 

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 KoSimpleColorSpaceFactory
KoColorProfilecreateColorProfile (const QByteArray &) const override
 
- Protected Member Functions inherited from KoColorSpaceFactory
 KoColorSpaceFactory ()
 

Detailed Description

template<class _CSTrait>
class KoAlphaColorSpaceFactoryImpl< _CSTrait >

Definition at line 193 of file KoAlphaColorSpace.h.

Member Typedef Documentation

◆ channels_type

template<class _CSTrait >
typedef _CSTrait::channels_type KoAlphaColorSpaceFactoryImpl< _CSTrait >::channels_type
private

Definition at line 195 of file KoAlphaColorSpace.h.

Constructor & Destructor Documentation

◆ KoAlphaColorSpaceFactoryImpl()

template<class _CSTrait >
KoAlphaColorSpaceFactoryImpl< _CSTrait >::KoAlphaColorSpaceFactoryImpl ( )
inline

Definition at line 198 of file KoAlphaColorSpace.h.

199 : KoSimpleColorSpaceFactory(alphaIdFromChannelType<channels_type>().id(),
200 alphaIdFromChannelType<channels_type>().name(),
201 false,
203 colorDepthIdForChannelType<channels_type>(),
204 sizeof(channels_type) * 8,
205 100000)
206 {
207 }
const KoID AlphaColorModelID("A", ki18n("Alpha mask"))
_CSTrait::channels_type channels_type
KoSimpleColorSpaceFactory(const QString &id, const QString &name, bool userVisible, const KoID &colorModelId, const KoID &colorDepthId, int referenceDepth=-1, int crossingCost=1)

Member Function Documentation

◆ colorConversionLinks()

template<class _CSTrait >
QList< KoColorConversionTransformationFactory * > KoAlphaColorSpaceFactoryImpl< _CSTrait >::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

Out Alpha color space is defined as "a flattened representation of a GrayA color space with sRGB tone curve". Therefore we do not define direct conversions to/from LabA, because LabA has a linear tone curve.

Implements KoColorSpaceFactory.

Definition at line 267 of file KoAlphaColorSpace.cpp.

268{
275
276 factories << new KoColorConversionFromAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Integer8BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
277 factories << new KoColorConversionToAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Integer8BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
278
279 factories << new KoColorConversionFromAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Integer16BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
280 factories << new KoColorConversionToAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Integer16BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
281
282 factories << new KoColorConversionFromAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Float16BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
283 factories << new KoColorConversionToAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Float16BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
284
285 factories << new KoColorConversionFromAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Float32BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
286 factories << new KoColorConversionToAlphaTransformationFactoryImpl<channels_type>(GrayAColorModelID.id(), Float32BitsColorDepthID.id(), "Gray-D50-elle-V2-srgbtrc.icc");
287
288 return factories;
289}
const KoID Float32BitsColorDepthID("F32", ki18n("32-bit float/channel"))
const KoID GrayAColorModelID("GRAYA", ki18n("Grayscale/Alpha"))
const KoID Float16BitsColorDepthID("F16", ki18n("16-bit float/channel"))
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID Integer16BitsColorDepthID("U16", ki18n("16-bit integer/channel"))
QString id() const
Definition KoID.cpp:63

References Float16BitsColorDepthID, Float32BitsColorDepthID, GrayAColorModelID, KoID::id(), Integer16BitsColorDepthID, and Integer8BitsColorDepthID.

◆ createColorSpace()

template<class _CSTrait >
KoColorSpace * KoAlphaColorSpaceFactoryImpl< _CSTrait >::createColorSpace ( const KoColorProfile * ) const
inlineoverridevirtual

creates a color space using the given profile.

Implements KoColorSpaceFactory.

Definition at line 209 of file KoAlphaColorSpace.h.


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