Warning, file /office/calligra/libs/pigment/KoMultipleColorConversionTransformation.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_MULTIPLE_COLOR_CONVERSION_TRANSFORMATION_H_
0021 #define _KO_MULTIPLE_COLOR_CONVERSION_TRANSFORMATION_H_
0022 
0023 #include <KoColorConversionTransformation.h>
0024 
0025 #include "pigment_export.h"
0026 
0027 /**
0028  * This color conversion transformation allows to create a chain of color conversion between two color
0029  * spaces.
0030  * For instance, imagine we have three color spaces : CSA , CSB and CSC , we only know a transformation
0031  * from CSA to CSB and from CSB to CSC , and we want to convert from CSA to CSC. Then we can create
0032  * a KoMultipleColorConversionTransformation, and add to it with
0033  *  KoMultipleColorConversionTransformation::appendTransfo a transformation from CSA to CSB and a
0034  * transformation from CSB to CSC.
0035  */
0036 class PIGMENTCMS_EXPORT KoMultipleColorConversionTransformation : public KoColorConversionTransformation
0037 {
0038 public:
0039     /**
0040      * Create a color transformation from srcCs to dstCs.
0041      * @param srcCs the first color space in the chain
0042      * @param dstCs the last color space in the chain
0043      */
0044     KoMultipleColorConversionTransformation(const KoColorSpace* srcCs, const KoColorSpace* dstCs, KoColorConversionTransformation::Intent, KoColorConversionTransformation::ConversionFlags conversionFlags);
0045     ~KoMultipleColorConversionTransformation() override;
0046     /**
0047      * Add a transformation to the chain.
0048      * @param transfo this transformation is then deleted when the
0049      *                KoMultipleColorConversionTransformation is deleted.
0050      */
0051     void appendTransfo(KoColorConversionTransformation* transfo);
0052     void transform(const quint8 *src, quint8 *dst, qint32 nPixels) const override;
0053 private:
0054     struct Private;
0055     Private* const d;
0056 };
0057 
0058 #endif