F:/KPlato/koffice/libs/pigment/KoCompositeOp.h

Aller à la documentation de ce fichier.
00001 /*
00002  *  Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this library; see the file COPYING.LIB.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef KOCOMPOSITEOP_H
00020 #define KOCOMPOSITEOP_H
00021 
00022 #include <QtCore>
00023 
00024 #include <koffice_export.h>
00025 
00026 class KoColorSpace;
00027 
00028 const QString COMPOSITE_OVER = "normal";
00029 const QString COMPOSITE_ERASE = "erase";
00030 const QString COMPOSITE_COPY = "copy";
00031 const QString COMPOSITE_ALPHA_DARKEN = "alphadarken";
00032 const QString COMPOSITE_IN = "in";
00033 const QString COMPOSITE_OUT = "out";
00034 const QString COMPOSITE_ATOP = "atop";
00035 const QString COMPOSITE_XOR = "xor";
00036 const QString COMPOSITE_PLUS = "plus";
00037 const QString COMPOSITE_MINUS = "minus";
00038 const QString COMPOSITE_ADD = "add";
00039 const QString COMPOSITE_SUBTRACT = "subtract";
00040 const QString COMPOSITE_DIFF = "diff";
00041 const QString COMPOSITE_MULT = "multiply";
00042 const QString COMPOSITE_DIVIDE = "divide";
00043 const QString COMPOSITE_DODGE = "dodge";
00044 const QString COMPOSITE_BURN = "burn";
00045 const QString COMPOSITE_BUMPMAP = "bumpmap";
00046 const QString COMPOSITE_CLEAR = "clear";
00047 const QString COMPOSITE_DISSOLVE = "dissolve";
00048 const QString COMPOSITE_DISPLACE = "displace";
00049 const QString COMPOSITE_NO = "nocomposition";
00050 const QString COMPOSITE_DARKEN = "darken";
00051 const QString COMPOSITE_LIGHTEN = "lighten";
00052 const QString COMPOSITE_HUE = "hue";
00053 const QString COMPOSITE_SATURATION = "saturation";
00054 const QString COMPOSITE_VALUE = "value";
00055 const QString COMPOSITE_COLOR = "color";
00056 const QString COMPOSITE_COLORIZE = "colorize";
00057 const QString COMPOSITE_LUMINIZE = "luminize";
00058 const QString COMPOSITE_SCREEN = "screen";
00059 const QString COMPOSITE_OVERLAY = "overlay";
00060 const QString COMPOSITE_UNDEF = "underfined";
00061 const QString COMPOSITE_COPY_RED = "copy_red";
00062 const QString COMPOSITE_COPY_GREEN = "copy_green";
00063 const QString COMPOSITE_COPY_BLUE = "copy_blue";
00064 const QString COMPOSITE_COPY_OPACITY = "copy_opacity";
00065 
00069 class PIGMENT_EXPORT KoCompositeOp {
00070 public:
00071 
00072     KoCompositeOp(KoColorSpace * cs, const QString& id, const QString& description, const bool userVisible = true);
00073     virtual ~KoCompositeOp() {};
00074 
00075     QString id() const { return m_id; }
00076     QString description() const { return m_description; }
00077     KoColorSpace * colorSpace() const { return m_colorSpace; }
00078     bool userVisible() const { return m_userVisible; }
00092     virtual void composite(quint8 *dstRowStart, qint32 dstRowStride, 
00093                            const quint8 *srcRowStart, qint32 srcRowStride, 
00094                            const quint8 *maskRowStart, qint32 maskRowStride, 
00095                            qint32 rows, qint32 numColumns, 
00096                            quint8 opacity) const;
00097 
00108     virtual void composite(quint8 *dstRowStart, qint32 dstRowStride, 
00109                            const quint8 *srcRowStart, qint32 srcRowStride, 
00110                            const quint8 *maskRowStart, qint32 maskRowStride, 
00111                            qint32 rows, qint32 numColumns, 
00112                            quint8 opacity,
00113                            const QBitArray & channelFlags) const = 0;
00114 
00115 protected:
00116     KoCompositeOp();
00117 
00118     KoColorSpace * m_colorSpace;
00119     QString m_id;
00120     QString m_description;
00121     mutable QBitArray m_defaultChannelFlags;
00122     bool m_userVisible;
00123 };
00124 
00125 typedef QList<KoCompositeOp*> KoCompositeOpList;
00126 
00127 #endif // KOCOMPOSITEOP_H

Généré le Wed Nov 22 23:41:13 2006 pour KPlato par  doxygen 1.5.1-p1