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{
17public:
18 void blend(QImage *const bottom, TextureTile const *const top) const override;
19};
20
21class IndependentChannelBlending : public Blending
22{
23public:
24 void blend(QImage *const bottom, TextureTile const *const top) const override;
25
26private:
27 // bottomColorIntensity: intensity of one color channel (of one pixel) of the bottom image
28 // topColorIntensity: intensity of one color channel (of one pixel) of the top image
29 // return: intensity of the color channel (of a given pixel) of the result image
30 // all color intensity values are in the range 0..1
31 virtual qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const = 0;
32};
33
34// Neutral blendings
35
36class AllanonBlending : public IndependentChannelBlending
37{
38 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
39};
40
41class ArcusTangentBlending : public IndependentChannelBlending
42{
43 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
44};
45
46class GeometricMeanBlending : public IndependentChannelBlending
47{
48 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
49};
50
51class LinearLightBlending : public IndependentChannelBlending
52{
53 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
54};
55
56class NoiseBlending : public Blending // or IndependentChannelBlending?
57{
58};
59
60class OverlayBlending : public IndependentChannelBlending
61{
62 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
63};
64
65class ParallelBlending : public IndependentChannelBlending
66{
67 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
68};
69
70class TextureBlending : public IndependentChannelBlending
71{
72 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
73};
74
75// Darkening blendings
76
77class ColorBurnBlending : public IndependentChannelBlending
78{
79 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
80};
81
82class DarkBlending : public IndependentChannelBlending
83{
84 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
85};
86
87class DarkenBlending : public IndependentChannelBlending
88{
89 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
90};
91
92class DivideBlending : public IndependentChannelBlending
93{
94 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
95};
96
97class GammaDarkBlending : public IndependentChannelBlending
98{
99 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
100};
101
102class LinearBurnBlending : public IndependentChannelBlending
103{
104 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
105};
106
107class MultiplyBlending : public IndependentChannelBlending
108{
109 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
110};
111
112class SubtractiveBlending : public IndependentChannelBlending
113{
114 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
115};
116
117// Lightening blendings
118
119class AdditiveBlending : public IndependentChannelBlending
120{
121 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
122};
123
124class ColorDodgeBlending : public IndependentChannelBlending
125{
126 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
127};
128
129class GammaLightBlending : public IndependentChannelBlending
130{
131 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
132};
133
134class HardLightBlending : public IndependentChannelBlending
135{
136 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
137};
138
139class LightBlending : public IndependentChannelBlending
140{
141 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
142};
143
144class LightenBlending : public IndependentChannelBlending
145{
146 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
147};
148
149class PinLightBlending : public IndependentChannelBlending
150{
151 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
152};
153
154class ScreenBlending : public IndependentChannelBlending
155{
156 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
157};
158
159class SoftLightBlending : public IndependentChannelBlending
160{
161 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
162};
163
164class VividLightBlending : public IndependentChannelBlending
165{
166 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
167};
168
169// Inverter blendings
170
171class AdditiveSubtractiveBlending : public IndependentChannelBlending
172{
173 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
174};
175
176class BleachBlending : public IndependentChannelBlending
177{
178 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
179};
180
181class DifferenceBlending : public IndependentChannelBlending
182{
183 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
184};
185
186class EquivalenceBlending : public IndependentChannelBlending
187{
188 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
189};
190
191class HalfDifferenceBlending : public IndependentChannelBlending
192{
193 qreal blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const override;
194};
195
196// Special purpose blendings
197
198class CloudsBlending : public Blending
199{
200public:
201 void blend(QImage *const bottom, TextureTile const *const top) const override;
202};
203
204class GrayscaleBlending : public Blending
205{
206public:
207 void blend(QImage *const bottom, TextureTile const *const top) const override;
208};
209
210class InvertColorBlending : public Blending
211{
212public:
213 void blend(QImage *const bottom, TextureTile const *const top) const override;
214};
215
216class InvertHueBlending : public Blending
217{
218public:
219 void blend(QImage *const bottom, TextureTile const *const top) const override;
220};
221
222}
223
224#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 Mon Nov 18 2024 12:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.