kis_composite_op.h
1/*
2 * Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18#ifndef KIS_COMPOSITE_OP_H_
19#define KIS_COMPOSITE_OP_H_
20
21#include <map>
22#include <tqvaluelist.h>
23
24//#include "kis_global.h"
25#include "kis_id.h"
26
27enum CompositeOp {
28 COMPOSITE_OVER,
29 COMPOSITE_IN,
30 COMPOSITE_OUT,
31 COMPOSITE_ATOP,
32 COMPOSITE_XOR,
33 COMPOSITE_PLUS,
34 COMPOSITE_MINUS,
35 COMPOSITE_ADD,
36 COMPOSITE_SUBTRACT,
37 COMPOSITE_DIFF,
38 COMPOSITE_MULT,
39 COMPOSITE_DIVIDE,
40 COMPOSITE_DODGE,
41 COMPOSITE_BURN,
42 COMPOSITE_BUMPMAP,
43 COMPOSITE_COPY,
44 COMPOSITE_COPY_RED,
45 COMPOSITE_COPY_GREEN,
46 COMPOSITE_COPY_BLUE,
47 COMPOSITE_COPY_OPACITY,
48 COMPOSITE_CLEAR,
49 COMPOSITE_DISSOLVE,
50 COMPOSITE_DISPLACE,
51#if 0
52 COMPOSITE_MODULATE,
53 COMPOSITE_THRESHOLD,
54#endif
55 COMPOSITE_NO,
56 COMPOSITE_DARKEN,
57 COMPOSITE_LIGHTEN,
58 COMPOSITE_HUE,
59 COMPOSITE_SATURATION,
60 COMPOSITE_VALUE,
61 COMPOSITE_COLOR,
62 COMPOSITE_COLORIZE,
63 COMPOSITE_LUMINIZE,
64 COMPOSITE_SCREEN,
65 COMPOSITE_OVERLAY,
66 COMPOSITE_COPY_CYAN,
67 COMPOSITE_COPY_MAGENTA,
68 COMPOSITE_COPY_YELLOW,
69 COMPOSITE_COPY_BLACK,
70 COMPOSITE_ERASE,
71 COMPOSITE_ALPHA_DARKEN,
72 COMPOSITE_UNDEF
73};
74
75class KisCompositeOp {
76public:
77 KisCompositeOp();
78 KisCompositeOp(const TQString& id);
79 KisCompositeOp(CompositeOp compositeOp);
80
81 KisID id() const { return m_id; }
82 CompositeOp op() const { return m_op; }
83
84 bool isValid() const { return m_valid; }
85
86 bool operator==(const KisCompositeOp& other) const;
87 bool operator!=(const KisCompositeOp& other) const;
88
89private:
90 void fillMap();
91
92private:
93 CompositeOp m_op;
94 KisID m_id;
95 bool m_valid;
96
97 typedef std::map<KisID, CompositeOp> KisIDCompositeOpMap;
98 static KisIDCompositeOpMap s_idOpMap;
99};
100
101typedef TQValueList<KisCompositeOp> KisCompositeOpList;
102
103#endif // KIS_COMPOSITE_OP_H
Chalk has a large number of extensible resources.
Definition kis_id.h:57