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

#include <KoDummyColorProfile.h>

+ Inheritance diagram for KoDummyColorProfile:

Public Member Functions

KoColorProfileclone () const override
 
bool compareTRC (TransferCharacteristics characteristics, float error) const override
 
void delinearizeFloatValue (QVector< double > &Value) const override
 
void delinearizeFloatValueFast (QVector< double > &Value) const override
 
QVector< double > getColorantsxyY () const override
 
QVector< double > getColorantsXYZ () const override
 
QVector< double > getEstimatedTRC () const override
 
QVector< double > getWhitePointxyY () const override
 
QVector< double > getWhitePointXYZ () const override
 
bool hasColorants () const override
 
bool hasTRC () const override
 
bool isLinear () const override
 
bool isSuitableForDisplay () const override
 
bool isSuitableForOutput () const override
 
bool isSuitableForPrinting () const override
 
 KoDummyColorProfile ()
 
void linearizeFloatValue (QVector< double > &Value) const override
 
void linearizeFloatValueFast (QVector< double > &Value) const override
 
bool operator== (const KoColorProfile &) const override
 
bool supportsAbsolute () const override
 
bool supportsPerceptual () const override
 
bool supportsRelative () const override
 
bool supportsSaturation () const override
 
QByteArray uniqueId () const override
 
bool valid () const override
 
float version () const override
 
 ~KoDummyColorProfile () override
 
- Public Member Functions inherited from KoColorProfile
virtual QString colorModelID () const
 
QString copyright () const
 
virtual void delinearizeFloatValue (QVector< qreal > &Value) const =0
 
virtual void delinearizeFloatValueFast (QVector< qreal > &Value) const =0
 
QString fileName () const
 
virtual ColorPrimaries getColorPrimaries () const
 getColorPrimaries
 
virtual TransferCharacteristics getTransferCharacteristics () const
 getTransferCharacteristics This function should be subclassed at some point so we can get the value from the lcms profile.
 
QString info () const
 
 KoColorProfile (const KoColorProfile &profile)
 
 KoColorProfile (const QString &fileName=QString())
 
virtual void linearizeFloatValue (QVector< qreal > &Value) const =0
 
virtual void linearizeFloatValueFast (QVector< qreal > &Value) const =0
 
virtual bool load ()
 
QString manufacturer () const
 
QString name () const
 
virtual QByteArray rawData () const
 
virtual bool save (const QString &fileName)
 
void setFileName (const QString &filename)
 
virtual QString type () const
 
virtual ~KoColorProfile ()
 
- Public Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Additional Inherited Members

- Static Public Member Functions inherited from KoColorProfile
static void colorantsForType (ColorPrimaries primaries, QVector< double > &colorants)
 colorantsForPrimaries fills a QVector<float> with the xy values of the whitepoint and red, green, blue colorants for a given predefined value. Will not change the vector when the primaries are set to 'undefined'.
 
static QString getColorPrimariesName (ColorPrimaries primaries)
 getColorPrimariesName
 
static QString getTransferCharacteristicName (TransferCharacteristics curve)
 getTransferCharacteristicName
 
- Public Attributes inherited from KoColorProfile
TransferCharacteristics characteristics {TRC_UNSPECIFIED}
 
QString copyright
 
QString fileName
 
QString info
 
QString manufacturer
 
QString name
 
int primaries {-1}
 
- Public Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 
- Protected Member Functions inherited from KoColorProfile
void setCharacteristics (ColorPrimaries primaries, TransferCharacteristics curve)
 setCharacteristics ideally, we'd read this from the icc profile curve, but that can be tricky, instead we'll set it on profile creation.
 
void setCopyright (const QString &copyright)
 
void setInfo (const QString &info)
 
void setManufacturer (const QString &manufacturer)
 
void setName (const QString &name)
 

Detailed Description

Definition at line 12 of file KoDummyColorProfile.h.

Constructor & Destructor Documentation

◆ KoDummyColorProfile()

KoDummyColorProfile::KoDummyColorProfile ( )

Definition at line 9 of file KoDummyColorProfile.cpp.

10{
11 setName("default");
12}
void setName(const QString &name)

References KoColorProfile::setName().

◆ ~KoDummyColorProfile()

KoDummyColorProfile::~KoDummyColorProfile ( )
override

Definition at line 14 of file KoDummyColorProfile.cpp.

15{
16}

Member Function Documentation

◆ clone()

KoColorProfile * KoDummyColorProfile::clone ( ) const
overridevirtual

Create a copy of this profile. Data that shall not change during the life time of the profile shouldn't be duplicated but shared, like for instance ICC data.

Data that shall be changed like a palette or hdr information such as exposure must be duplicated while cloning.

Implements KoColorProfile.

Definition at line 18 of file KoDummyColorProfile.cpp.

19{
20 return new KoDummyColorProfile();
21}

References KoDummyColorProfile().

◆ compareTRC()

bool KoDummyColorProfile::compareTRC ( TransferCharacteristics characteristics,
float error ) const
overridevirtual

Comparing profile's TRC against the other with defined error threshold, returns true if profile TRC is matched.

Implements KoColorProfile.

Definition at line 109 of file KoDummyColorProfile.cpp.

110{
111 return false;
112}

◆ delinearizeFloatValue()

void KoDummyColorProfile::delinearizeFloatValue ( QVector< double > & Value) const
override

Definition at line 118 of file KoDummyColorProfile.cpp.

119{
120}

◆ delinearizeFloatValueFast()

void KoDummyColorProfile::delinearizeFloatValueFast ( QVector< double > & Value) const
override

Definition at line 125 of file KoDummyColorProfile.cpp.

126{
127}

◆ getColorantsxyY()

QVector< double > KoDummyColorProfile::getColorantsxyY ( ) const
overridevirtual
Returns
a qvector <double>(9) with the RGB colorants in xyY

Implements KoColorProfile.

Definition at line 80 of file KoDummyColorProfile.cpp.

81{
82 QVector<double> d50Dummy(3);
83 d50Dummy<<0.34773<<0.35952<<1.0;
84 return d50Dummy;
85}

◆ getColorantsXYZ()

QVector< double > KoDummyColorProfile::getColorantsXYZ ( ) const
overridevirtual
Returns
a qvector <double>(9) with the RGB colorants in XYZ

Implements KoColorProfile.

Definition at line 73 of file KoDummyColorProfile.cpp.

74{
75 QVector<double> d50Dummy(3);
76 d50Dummy<<0.34773<<0.35952<<1.0;
77 return d50Dummy;
78}

◆ getEstimatedTRC()

QVector< double > KoDummyColorProfile::getEstimatedTRC ( ) const
overridevirtual
Returns
estimated gamma for RGB and Grayscale profiles

Implements KoColorProfile.

Definition at line 101 of file KoDummyColorProfile.cpp.

103{
104 QVector<double> Dummy(3);
105 Dummy.fill(2.2);
106 return Dummy;
107}

◆ getWhitePointxyY()

QVector< double > KoDummyColorProfile::getWhitePointxyY ( ) const
overridevirtual
Returns
a qvector <double>(3) with the whitepoint in xyY

Implements KoColorProfile.

Definition at line 94 of file KoDummyColorProfile.cpp.

95{
96 QVector<double> d50Dummy(3);
97 d50Dummy<<0.34773<<0.35952<<1.0;
98 return d50Dummy;
99}

◆ getWhitePointXYZ()

QVector< double > KoDummyColorProfile::getWhitePointXYZ ( ) const
overridevirtual
Returns
a qvector <double>(3) with the whitepoint in XYZ

Implements KoColorProfile.

Definition at line 87 of file KoDummyColorProfile.cpp.

88{
89 QVector<double> d50Dummy(3);
90 d50Dummy<<0.9642<<1.0000<<0.8249;
91 return d50Dummy;
92}

◆ hasColorants()

bool KoDummyColorProfile::hasColorants ( ) const
overridevirtual
Returns
if the profile has colorants.

Implements KoColorProfile.

Definition at line 61 of file KoDummyColorProfile.cpp.

62{
63 return true;
64}

◆ hasTRC()

bool KoDummyColorProfile::hasTRC ( ) const
overridevirtual
Returns
if the profile has a TRC(required for linearisation).

Implements KoColorProfile.

Definition at line 65 of file KoDummyColorProfile.cpp.

66{
67 return true;
68}

◆ isLinear()

bool KoDummyColorProfile::isLinear ( ) const
overridevirtual
Returns
if the profile's TRCs are linear.

Implements KoColorProfile.

Definition at line 69 of file KoDummyColorProfile.cpp.

70{
71 return true;
72}

◆ isSuitableForDisplay()

bool KoDummyColorProfile::isSuitableForDisplay ( ) const
overridevirtual
Returns
true if this profile is suitable to use for display

Implements KoColorProfile.

Definition at line 41 of file KoDummyColorProfile.cpp.

42{
43 return true;
44}

◆ isSuitableForOutput()

bool KoDummyColorProfile::isSuitableForOutput ( ) const
overridevirtual
Returns
true if you can use this profile can be used to convert color from a different profile to this one

Implements KoColorProfile.

Definition at line 31 of file KoDummyColorProfile.cpp.

32{
33 return true;
34}

◆ isSuitableForPrinting()

bool KoDummyColorProfile::isSuitableForPrinting ( ) const
overridevirtual
Returns
true if this profile is suitable to use for printing

Implements KoColorProfile.

Definition at line 36 of file KoDummyColorProfile.cpp.

37{
38 return true;
39}

◆ linearizeFloatValue()

void KoDummyColorProfile::linearizeFloatValue ( QVector< double > & Value) const
override

Definition at line 114 of file KoDummyColorProfile.cpp.

115{
116}

◆ linearizeFloatValueFast()

void KoDummyColorProfile::linearizeFloatValueFast ( QVector< double > & Value) const
override

Definition at line 121 of file KoDummyColorProfile.cpp.

122{
123}

◆ operator==()

bool KoDummyColorProfile::operator== ( const KoColorProfile & rhs) const
overridevirtual

Implements KoColorProfile.

Definition at line 128 of file KoDummyColorProfile.cpp.

129{
130 return dynamic_cast<const KoDummyColorProfile*>(&rhs);
131}

◆ supportsAbsolute()

bool KoDummyColorProfile::supportsAbsolute ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 53 of file KoDummyColorProfile.cpp.

54{
55 return true;
56}

◆ supportsPerceptual()

bool KoDummyColorProfile::supportsPerceptual ( ) const
overridevirtual
Returns
which rendering intents are supported

Implements KoColorProfile.

Definition at line 45 of file KoDummyColorProfile.cpp.

46{
47 return true;
48}

◆ supportsRelative()

bool KoDummyColorProfile::supportsRelative ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 57 of file KoDummyColorProfile.cpp.

58{
59 return true;
60}

◆ supportsSaturation()

bool KoDummyColorProfile::supportsSaturation ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 49 of file KoDummyColorProfile.cpp.

50{
51 return true;
52}

◆ uniqueId()

QByteArray KoDummyColorProfile::uniqueId ( ) const
overridevirtual

Implements KoColorProfile.

Definition at line 133 of file KoDummyColorProfile.cpp.

134{
135 return QByteArray();
136}

◆ valid()

bool KoDummyColorProfile::valid ( ) const
overridevirtual
Returns
true if the profile is valid, false if it isn't been loaded in memory yet, or if the loaded memory is a bad profile

Implements KoColorProfile.

Definition at line 23 of file KoDummyColorProfile.cpp.

24{
25 return true;
26}

◆ version()

float KoDummyColorProfile::version ( ) const
overridevirtual

Return version

Implements KoColorProfile.

Definition at line 27 of file KoDummyColorProfile.cpp.

28{
29 return 0.0;
30}

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