Marble

BlendingAlgorithms.h
1// SPDX-FileCopyrightText: 2010 Jens-Michael Hoffmann <jmho@c-xx.com>
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
12namespace Marble
13{
14
15class OverpaintBlending: public Blending
16{
17 public:
18 void blend( QImage * const bottom, TextureTile const * const top ) const override;
19};
20
21class 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
37class AllanonBlending: public IndependentChannelBlending
38{
39 qreal blendChannel( qreal const bottomColorIntensity,
40 qreal const topColorIntensity ) const override;
41};
42
43class ArcusTangentBlending: public IndependentChannelBlending
44{
45 qreal blendChannel( qreal const bottomColorIntensity,
46 qreal const topColorIntensity ) const override;
47};
48
49class GeometricMeanBlending: public IndependentChannelBlending
50{
51 qreal blendChannel( qreal const bottomColorIntensity,
52 qreal const topColorIntensity ) const override;
53};
54
55class LinearLightBlending: public IndependentChannelBlending
56{
57 qreal blendChannel( qreal const bottomColorIntensity,
58 qreal const topColorIntensity ) const override;
59};
60
61class NoiseBlending: public Blending // or IndependentChannelBlending?
62{
63};
64
65class OverlayBlending: public IndependentChannelBlending
66{
67 qreal blendChannel( qreal const bottomColorIntensity,
68 qreal const topColorIntensity ) const override;
69};
70
71class ParallelBlending: public IndependentChannelBlending
72{
73 qreal blendChannel( qreal const bottomColorIntensity,
74 qreal const topColorIntensity ) const override;
75};
76
77class TextureBlending: public IndependentChannelBlending
78{
79 qreal blendChannel( qreal const bottomColorIntensity,
80 qreal const topColorIntensity ) const override;
81};
82
83
84// Darkening blendings
85
86class ColorBurnBlending: public IndependentChannelBlending
87{
88 qreal blendChannel( qreal const bottomColorIntensity,
89 qreal const topColorIntensity ) const override;
90};
91
92class DarkBlending: public IndependentChannelBlending
93{
94 qreal blendChannel( qreal const bottomColorIntensity,
95 qreal const topColorIntensity ) const override;
96};
97
98class DarkenBlending: public IndependentChannelBlending
99{
100 qreal blendChannel( qreal const bottomColorIntensity,
101 qreal const topColorIntensity ) const override;
102};
103
104class DivideBlending: public IndependentChannelBlending
105{
106 qreal blendChannel( qreal const bottomColorIntensity,
107 qreal const topColorIntensity ) const override;
108};
109
110class GammaDarkBlending: public IndependentChannelBlending
111{
112 qreal blendChannel( qreal const bottomColorIntensity,
113 qreal const topColorIntensity ) const override;
114};
115
116class LinearBurnBlending: public IndependentChannelBlending
117{
118 qreal blendChannel( qreal const bottomColorIntensity,
119 qreal const topColorIntensity ) const override;
120};
121
122class MultiplyBlending: public IndependentChannelBlending
123{
124 qreal blendChannel( qreal const bottomColorIntensity,
125 qreal const topColorIntensity ) const override;
126};
127
128class SubtractiveBlending: public IndependentChannelBlending
129{
130 qreal blendChannel( qreal const bottomColorIntensity,
131 qreal const topColorIntensity ) const override;
132};
133
134
135// Lightening blendings
136
137class AdditiveBlending: public IndependentChannelBlending
138{
139 qreal blendChannel( qreal const bottomColorIntensity,
140 qreal const topColorIntensity ) const override;
141};
142
143class ColorDodgeBlending: public IndependentChannelBlending
144{
145 qreal blendChannel( qreal const bottomColorIntensity,
146 qreal const topColorIntensity ) const override;
147};
148
149class GammaLightBlending: public IndependentChannelBlending
150{
151 qreal blendChannel( qreal const bottomColorIntensity,
152 qreal const topColorIntensity ) const override;
153};
154
155class HardLightBlending: public IndependentChannelBlending
156{
157 qreal blendChannel( qreal const bottomColorIntensity,
158 qreal const topColorIntensity ) const override;
159};
160
161class LightBlending: public IndependentChannelBlending
162{
163 qreal blendChannel( qreal const bottomColorIntensity,
164 qreal const topColorIntensity ) const override;
165};
166
167class LightenBlending: public IndependentChannelBlending
168{
169 qreal blendChannel( qreal const bottomColorIntensity,
170 qreal const topColorIntensity ) const override;
171};
172
173class PinLightBlending: public IndependentChannelBlending
174{
175 qreal blendChannel( qreal const bottomColorIntensity,
176 qreal const topColorIntensity ) const override;
177};
178
179class ScreenBlending: public IndependentChannelBlending
180{
181 qreal blendChannel( qreal const bottomColorIntensity,
182 qreal const topColorIntensity ) const override;
183};
184
185class SoftLightBlending: public IndependentChannelBlending
186{
187 qreal blendChannel( qreal const bottomColorIntensity,
188 qreal const topColorIntensity ) const override;
189};
190
191class VividLightBlending: public IndependentChannelBlending
192{
193 qreal blendChannel( qreal const bottomColorIntensity,
194 qreal const topColorIntensity ) const override;
195};
196
197
198// Inverter blendings
199
200class AdditiveSubtractiveBlending: public IndependentChannelBlending
201{
202 qreal blendChannel( qreal const bottomColorIntensity,
203 qreal const topColorIntensity ) const override;
204};
205
206class BleachBlending: public IndependentChannelBlending
207{
208 qreal blendChannel( qreal const bottomColorIntensity,
209 qreal const topColorIntensity ) const override;
210};
211
212class DifferenceBlending: public IndependentChannelBlending
213{
214 qreal blendChannel( qreal const bottomColorIntensity,
215 qreal const topColorIntensity ) const override;
216};
217
218class EquivalenceBlending: public IndependentChannelBlending
219{
220 qreal blendChannel( qreal const bottomColorIntensity,
221 qreal const topColorIntensity ) const override;
222};
223
224class HalfDifferenceBlending: public IndependentChannelBlending
225{
226 qreal blendChannel( qreal const bottomColorIntensity,
227 qreal const topColorIntensity ) const override;
228};
229
230
231// Special purpose blendings
232
233class CloudsBlending: public Blending
234{
235 public:
236 void blend( QImage * const bottom, TextureTile const * const top ) const override;
237};
238
239class GrayscaleBlending: public Blending
240{
241 public:
242 void blend( QImage * const bottom, TextureTile const * const top ) const override;
243};
244
245class InvertColorBlending: public Blending
246{
247 public:
248 void blend( QImage * const bottom, TextureTile const * const top ) const override;
249};
250
251class 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-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.