Marble

BlendingAlgorithms.h
1 // SPDX-FileCopyrightText: 2010 Jens-Michael Hoffmann <[email protected]>
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 
5 #ifndef MARBLE_BLENDING_ALGORITHMS_H
6 #define MARBLE_BLENDING_ALGORITHMS_H
7 
8 #include <QtGlobal>
9 
10 #include "Blending.h"
11 
12 namespace Marble
13 {
14 
15 class OverpaintBlending: public Blending
16 {
17  public:
18  void blend( QImage * const bottom, TextureTile const * const top ) const override;
19 };
20 
21 class IndependentChannelBlending: public Blending
22 {
23  public:
24  void blend( QImage * const bottom, TextureTile const * const top ) const override;
25  private:
26  // bottomColorIntensity: intensity of one color channel (of one pixel) of the bottom image
27  // topColorIntensity: intensity of one color channel (of one pixel) of the top image
28  // return: intensity of the color channel (of a given pixel) of the result image
29  // all color intensity values are in the range 0..1
30  virtual qreal blendChannel( qreal const bottomColorIntensity,
31  qreal const topColorIntensity ) const = 0;
32 };
33 
34 
35 // Neutral blendings
36 
37 class AllanonBlending: public IndependentChannelBlending
38 {
39  qreal blendChannel( qreal const bottomColorIntensity,
40  qreal const topColorIntensity ) const override;
41 };
42 
43 class ArcusTangentBlending: public IndependentChannelBlending
44 {
45  qreal blendChannel( qreal const bottomColorIntensity,
46  qreal const topColorIntensity ) const override;
47 };
48 
49 class GeometricMeanBlending: public IndependentChannelBlending
50 {
51  qreal blendChannel( qreal const bottomColorIntensity,
52  qreal const topColorIntensity ) const override;
53 };
54 
55 class LinearLightBlending: public IndependentChannelBlending
56 {
57  qreal blendChannel( qreal const bottomColorIntensity,
58  qreal const topColorIntensity ) const override;
59 };
60 
61 class NoiseBlending: public Blending // or IndependentChannelBlending?
62 {
63 };
64 
65 class OverlayBlending: public IndependentChannelBlending
66 {
67  qreal blendChannel( qreal const bottomColorIntensity,
68  qreal const topColorIntensity ) const override;
69 };
70 
71 class ParallelBlending: public IndependentChannelBlending
72 {
73  qreal blendChannel( qreal const bottomColorIntensity,
74  qreal const topColorIntensity ) const override;
75 };
76 
77 class TextureBlending: public IndependentChannelBlending
78 {
79  qreal blendChannel( qreal const bottomColorIntensity,
80  qreal const topColorIntensity ) const override;
81 };
82 
83 
84 // Darkening blendings
85 
86 class ColorBurnBlending: public IndependentChannelBlending
87 {
88  qreal blendChannel( qreal const bottomColorIntensity,
89  qreal const topColorIntensity ) const override;
90 };
91 
92 class DarkBlending: public IndependentChannelBlending
93 {
94  qreal blendChannel( qreal const bottomColorIntensity,
95  qreal const topColorIntensity ) const override;
96 };
97 
98 class DarkenBlending: public IndependentChannelBlending
99 {
100  qreal blendChannel( qreal const bottomColorIntensity,
101  qreal const topColorIntensity ) const override;
102 };
103 
104 class DivideBlending: public IndependentChannelBlending
105 {
106  qreal blendChannel( qreal const bottomColorIntensity,
107  qreal const topColorIntensity ) const override;
108 };
109 
110 class GammaDarkBlending: public IndependentChannelBlending
111 {
112  qreal blendChannel( qreal const bottomColorIntensity,
113  qreal const topColorIntensity ) const override;
114 };
115 
116 class LinearBurnBlending: public IndependentChannelBlending
117 {
118  qreal blendChannel( qreal const bottomColorIntensity,
119  qreal const topColorIntensity ) const override;
120 };
121 
122 class MultiplyBlending: public IndependentChannelBlending
123 {
124  qreal blendChannel( qreal const bottomColorIntensity,
125  qreal const topColorIntensity ) const override;
126 };
127 
128 class SubtractiveBlending: public IndependentChannelBlending
129 {
130  qreal blendChannel( qreal const bottomColorIntensity,
131  qreal const topColorIntensity ) const override;
132 };
133 
134 
135 // Lightening blendings
136 
137 class AdditiveBlending: public IndependentChannelBlending
138 {
139  qreal blendChannel( qreal const bottomColorIntensity,
140  qreal const topColorIntensity ) const override;
141 };
142 
143 class ColorDodgeBlending: public IndependentChannelBlending
144 {
145  qreal blendChannel( qreal const bottomColorIntensity,
146  qreal const topColorIntensity ) const override;
147 };
148 
149 class GammaLightBlending: public IndependentChannelBlending
150 {
151  qreal blendChannel( qreal const bottomColorIntensity,
152  qreal const topColorIntensity ) const override;
153 };
154 
155 class HardLightBlending: public IndependentChannelBlending
156 {
157  qreal blendChannel( qreal const bottomColorIntensity,
158  qreal const topColorIntensity ) const override;
159 };
160 
161 class LightBlending: public IndependentChannelBlending
162 {
163  qreal blendChannel( qreal const bottomColorIntensity,
164  qreal const topColorIntensity ) const override;
165 };
166 
167 class LightenBlending: public IndependentChannelBlending
168 {
169  qreal blendChannel( qreal const bottomColorIntensity,
170  qreal const topColorIntensity ) const override;
171 };
172 
173 class PinLightBlending: public IndependentChannelBlending
174 {
175  qreal blendChannel( qreal const bottomColorIntensity,
176  qreal const topColorIntensity ) const override;
177 };
178 
179 class ScreenBlending: public IndependentChannelBlending
180 {
181  qreal blendChannel( qreal const bottomColorIntensity,
182  qreal const topColorIntensity ) const override;
183 };
184 
185 class SoftLightBlending: public IndependentChannelBlending
186 {
187  qreal blendChannel( qreal const bottomColorIntensity,
188  qreal const topColorIntensity ) const override;
189 };
190 
191 class VividLightBlending: public IndependentChannelBlending
192 {
193  qreal blendChannel( qreal const bottomColorIntensity,
194  qreal const topColorIntensity ) const override;
195 };
196 
197 
198 // Inverter blendings
199 
200 class AdditiveSubtractiveBlending: public IndependentChannelBlending
201 {
202  qreal blendChannel( qreal const bottomColorIntensity,
203  qreal const topColorIntensity ) const override;
204 };
205 
206 class BleachBlending: public IndependentChannelBlending
207 {
208  qreal blendChannel( qreal const bottomColorIntensity,
209  qreal const topColorIntensity ) const override;
210 };
211 
212 class DifferenceBlending: public IndependentChannelBlending
213 {
214  qreal blendChannel( qreal const bottomColorIntensity,
215  qreal const topColorIntensity ) const override;
216 };
217 
218 class EquivalenceBlending: public IndependentChannelBlending
219 {
220  qreal blendChannel( qreal const bottomColorIntensity,
221  qreal const topColorIntensity ) const override;
222 };
223 
224 class HalfDifferenceBlending: public IndependentChannelBlending
225 {
226  qreal blendChannel( qreal const bottomColorIntensity,
227  qreal const topColorIntensity ) const override;
228 };
229 
230 
231 // Special purpose blendings
232 
233 class CloudsBlending: public Blending
234 {
235  public:
236  void blend( QImage * const bottom, TextureTile const * const top ) const override;
237 };
238 
239 class GrayscaleBlending: public Blending
240 {
241  public:
242  void blend( QImage * const bottom, TextureTile const * const top ) const override;
243 };
244 
245 class InvertColorBlending: public Blending
246 {
247  public:
248  void blend( QImage * const bottom, TextureTile const * const top ) const override;
249 };
250 
251 class InvertHueBlending: public Blending
252 {
253  public:
254  void blend( QImage * const bottom, TextureTile const * const top ) const override;
255 };
256 
257 }
258 
259 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.