File indexing completed on 2024-12-22 04:11:37

0001 /*
0002  *  SPDX-FileCopyrightText: 2010 Cyrille Berger <cberger@cberger.net>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #include "KoDummyColorProfile.h"
0008 
0009 KoDummyColorProfile::KoDummyColorProfile()
0010 {
0011     setName("default");
0012 }
0013 
0014 KoDummyColorProfile::~KoDummyColorProfile()
0015 {
0016 }
0017 
0018 KoColorProfile* KoDummyColorProfile::clone() const
0019 {
0020     return new KoDummyColorProfile();
0021 }
0022 
0023 bool KoDummyColorProfile::valid() const
0024 {
0025     return true;
0026 }
0027 float KoDummyColorProfile::version() const
0028 {
0029     return 0.0;
0030 }
0031 bool KoDummyColorProfile::isSuitableForOutput() const
0032 {
0033     return true;
0034 }
0035 
0036 bool KoDummyColorProfile::isSuitableForPrinting() const
0037 {
0038     return true;
0039 }
0040 
0041 bool KoDummyColorProfile::isSuitableForDisplay() const
0042 {
0043     return true;
0044 }
0045 bool KoDummyColorProfile::supportsPerceptual() const
0046 {
0047     return true;
0048 }
0049 bool KoDummyColorProfile::supportsSaturation() const
0050 {
0051     return true;
0052 }
0053 bool KoDummyColorProfile::supportsAbsolute() const
0054 {
0055     return true;
0056 }
0057 bool KoDummyColorProfile::supportsRelative() const
0058 {
0059     return true;
0060 }
0061 bool KoDummyColorProfile::hasColorants() const
0062 {
0063     return true;
0064 }
0065 bool KoDummyColorProfile::hasTRC() const
0066 {
0067     return true;
0068 }
0069 bool KoDummyColorProfile::isLinear() const
0070 {
0071     return true;
0072 }
0073 QVector<double> KoDummyColorProfile::getColorantsXYZ() const
0074 {
0075     QVector<double> d50Dummy(3);
0076     d50Dummy<<0.34773<<0.35952<<1.0;
0077     return d50Dummy;
0078 }
0079 
0080 QVector<double> KoDummyColorProfile::getColorantsxyY() const
0081 {
0082     QVector<double> d50Dummy(3);
0083     d50Dummy<<0.34773<<0.35952<<1.0;
0084     return d50Dummy;
0085 }
0086 
0087 QVector<double> KoDummyColorProfile::getWhitePointXYZ() const
0088 {
0089     QVector<double> d50Dummy(3);
0090     d50Dummy<<0.9642<<1.0000<<0.8249;
0091     return d50Dummy;
0092 }
0093 
0094 QVector<double> KoDummyColorProfile::getWhitePointxyY() const
0095 {
0096     QVector<double> d50Dummy(3);
0097     d50Dummy<<0.34773<<0.35952<<1.0;
0098     return d50Dummy;
0099 }
0100 
0101 QVector <double> KoDummyColorProfile::getEstimatedTRC() const
0102 
0103 {
0104     QVector<double> Dummy(3);
0105     Dummy.fill(2.2);
0106     return Dummy;
0107 }
0108 
0109 bool KoDummyColorProfile::compareTRC(TransferCharacteristics, float) const
0110 {
0111     return false;
0112 }
0113 
0114 void KoDummyColorProfile::linearizeFloatValue(QVector <double> & ) const
0115 {
0116 }
0117 
0118 void KoDummyColorProfile::delinearizeFloatValue(QVector <double> & ) const
0119 {
0120 }
0121 void KoDummyColorProfile::linearizeFloatValueFast(QVector <double> & ) const
0122 {
0123 }
0124 
0125 void KoDummyColorProfile::delinearizeFloatValueFast(QVector <double> & ) const
0126 {
0127 }
0128 bool KoDummyColorProfile::operator==(const KoColorProfile& rhs) const
0129 {
0130     return dynamic_cast<const KoDummyColorProfile*>(&rhs);
0131 }
0132 
0133 QByteArray KoDummyColorProfile::uniqueId() const
0134 {
0135     return QByteArray();
0136 }
0137