Warning, file /office/calligra/libs/pigment/KoFallBackColorTransformation.h 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) 2007 Cyrille Berger <cberger@cberger.net> 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 #ifndef _KO_FALL_BACK_COLOR_TRANSFORMATION_H_ 0021 #define _KO_FALL_BACK_COLOR_TRANSFORMATION_H_ 0022 0023 #include "KoColorTransformation.h" 0024 0025 #include "pigment_export.h" 0026 0027 class KoColorSpace; 0028 class KoColorConversionTransformation; 0029 0030 /** 0031 * Use this color transformation to encapsulate another KoColorTransformation 0032 * and perform a color conversion before and after using that KoColorTransformation. 0033 */ 0034 class PIGMENTCMS_EXPORT KoFallBackColorTransformation : public KoColorTransformation 0035 { 0036 public: 0037 /** 0038 * Create a fall back color transformation using the given two color 0039 * spaces. This constructor will initialize his own color conversion 0040 * objects. 0041 * 0042 * The created object takes owner ship of the transformation and will 0043 * take charge of deleting it. 0044 * 0045 * @param cs color space of the source and destination pixels 0046 * @param fallBackCS color space use natively by the color transformation 0047 * @param transfo the color transformation (working in the fallback color space) 0048 */ 0049 KoFallBackColorTransformation(const KoColorSpace* _cs, const KoColorSpace* _fallBackCS, KoColorTransformation* _transfo); 0050 /** 0051 * Creates a fall back color transformation using the two transformations 0052 * given as parameters. The created object take ownership of the 0053 * conversion and the color transformations and will be in charge of 0054 * deleting them. 0055 * 0056 * @param csToFallBack transformation from the color space to the fallback 0057 * @param fallBackToCs transformation from the fallback to the color space 0058 * @param transfo the color transformation (working in the fallback color space) 0059 */ 0060 KoFallBackColorTransformation(KoColorConversionTransformation* _csToFallBack, KoColorConversionTransformation* _fallBackToCs, KoColorTransformation* _transfo); 0061 ~KoFallBackColorTransformation() override; 0062 void transform(const quint8 *src, quint8 *dst, qint32 nPixels) const override; 0063 QList<QString> parameters() const override; 0064 int parameterId(const QString& name) const override; 0065 void setParameter(int id, const QVariant& parameter) override; 0066 private: 0067 struct Private; 0068 Private* const d; 0069 }; 0070 0071 #endif