Warning, file /office/calligra/libs/pigment/KoColorSpaceMaths.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.bet
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Lesser General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2.1 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Lesser General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Lesser General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018 */
0019 
0020 #include <KoColorSpaceMaths.h>
0021 
0022 #include <cfloat>
0023 
0024 #include <QtGlobal>
0025 
0026 #ifdef HAVE_OPENEXR
0027 const half KoColorSpaceMathsTraits<half>::zeroValue = 0.0;
0028 const half KoColorSpaceMathsTraits<half>::unitValue = 1.0;
0029 const half KoColorSpaceMathsTraits<half>::halfValue = 0.5;
0030 const half KoColorSpaceMathsTraits<half>::max = HALF_MAX;
0031 const half KoColorSpaceMathsTraits<half>::min = -HALF_MAX;
0032 const half KoColorSpaceMathsTraits<half>::epsilon = HALF_EPSILON;
0033 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<half>::channelValueType = KoChannelInfo::FLOAT16;
0034 #endif
0035 
0036 const float KoColorSpaceMathsTraits<float>::zeroValue = 0.0;
0037 const float KoColorSpaceMathsTraits<float>::unitValue = 1.0;
0038 const float KoColorSpaceMathsTraits<float>::halfValue = 0.5;
0039 const float KoColorSpaceMathsTraits<float>::max = FLT_MAX;
0040 const float KoColorSpaceMathsTraits<float>::min = -FLT_MAX;
0041 const float KoColorSpaceMathsTraits<float>::epsilon = FLT_EPSILON;
0042 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<float>::channelValueType = KoChannelInfo::FLOAT32;
0043 
0044 const double KoColorSpaceMathsTraits<double>::zeroValue = 0.0;
0045 const double KoColorSpaceMathsTraits<double>::unitValue = 1.0;
0046 const double KoColorSpaceMathsTraits<double>::halfValue = 0.5;
0047 const double KoColorSpaceMathsTraits<double>::max = DBL_MAX;
0048 const double KoColorSpaceMathsTraits<double>::min = -DBL_MAX;
0049 const double KoColorSpaceMathsTraits<double>::epsilon = DBL_EPSILON;
0050 
0051 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<double>::channelValueType = KoChannelInfo::FLOAT64;
0052 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<quint8>::channelValueType = KoChannelInfo::UINT8;
0053 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<quint16>::channelValueType = KoChannelInfo::UINT16;
0054 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<qint16>::channelValueType = KoChannelInfo::INT16;
0055 const KoChannelInfo::enumChannelValueType KoColorSpaceMathsTraits<quint32>::channelValueType = KoChannelInfo::UINT32;
0056 
0057 const Ko::FullLut< KoIntegerToFloat<quint16>, float, quint16> KoLuts::Uint16ToFloat;
0058 const Ko::FullLut< KoIntegerToFloat<quint8>, float, quint8> KoLuts::Uint8ToFloat;