• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • blendings
BlendingAlgorithms.h
Go to the documentation of this file.
1 // Copyright 2010 Jens-Michael Hoffmann <jmho@c-xx.com>
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library. If not, see <http://www.gnu.org/licenses/>.
15 
16 #ifndef MARBLE_BLENDING_ALGORITHMS_H
17 #define MARBLE_BLENDING_ALGORITHMS_H
18 
19 #include <QtGlobal>
20 
21 #include "Blending.h"
22 
23 namespace Marble
24 {
25 
26 class OverpaintBlending: public Blending
27 {
28  public:
29  virtual void blend( QImage * const bottom, TextureTile const * const top ) const;
30 };
31 
32 class IndependentChannelBlending: public Blending
33 {
34  public:
35  virtual void blend( QImage * const bottom, TextureTile const * const top ) const;
36  private:
37  // bottomColorIntensity: intensity of one color channel (of one pixel) of the bottom image
38  // topColorIntensity: intensity of one color channel (of one pixel) of the top image
39  // return: intensity of the color channel (of a given pixel) of the result image
40  // all color intensity values are in the range 0..1
41  virtual qreal blendChannel( qreal const bottomColorIntensity,
42  qreal const topColorIntensity ) const = 0;
43 };
44 
45 
46 // Neutral blendings
47 
48 class AllanonBlending: public IndependentChannelBlending
49 {
50  virtual qreal blendChannel( qreal const bottomColorIntensity,
51  qreal const topColorIntensity ) const;
52 };
53 
54 class ArcusTangentBlending: public IndependentChannelBlending
55 {
56  virtual qreal blendChannel( qreal const bottomColorIntensity,
57  qreal const topColorIntensity ) const;
58 };
59 
60 class GeometricMeanBlending: public IndependentChannelBlending
61 {
62  virtual qreal blendChannel( qreal const bottomColorIntensity,
63  qreal const topColorIntensity ) const;
64 };
65 
66 class LinearLightBlending: public IndependentChannelBlending
67 {
68  virtual qreal blendChannel( qreal const bottomColorIntensity,
69  qreal const topColorIntensity ) const;
70 };
71 
72 class NoiseBlending: public Blending // or IndependentChannelBlending?
73 {
74 };
75 
76 class OverlayBlending: public IndependentChannelBlending
77 {
78  virtual qreal blendChannel( qreal const bottomColorIntensity,
79  qreal const topColorIntensity ) const;
80 };
81 
82 class ParallelBlending: public IndependentChannelBlending
83 {
84  virtual qreal blendChannel( qreal const bottomColorIntensity,
85  qreal const topColorIntensity ) const;
86 };
87 
88 class TextureBlending: public IndependentChannelBlending
89 {
90  virtual qreal blendChannel( qreal const bottomColorIntensity,
91  qreal const topColorIntensity ) const;
92 };
93 
94 
95 // Darkening blendings
96 
97 class ColorBurnBlending: public IndependentChannelBlending
98 {
99  virtual qreal blendChannel( qreal const bottomColorIntensity,
100  qreal const topColorIntensity ) const;
101 };
102 
103 class DarkBlending: public IndependentChannelBlending
104 {
105  virtual qreal blendChannel( qreal const bottomColorIntensity,
106  qreal const topColorIntensity ) const;
107 };
108 
109 class DarkenBlending: public IndependentChannelBlending
110 {
111  virtual qreal blendChannel( qreal const bottomColorIntensity,
112  qreal const topColorIntensity ) const;
113 };
114 
115 class DivideBlending: public IndependentChannelBlending
116 {
117  virtual qreal blendChannel( qreal const bottomColorIntensity,
118  qreal const topColorIntensity ) const;
119 };
120 
121 class GammaDarkBlending: public IndependentChannelBlending
122 {
123  virtual qreal blendChannel( qreal const bottomColorIntensity,
124  qreal const topColorIntensity ) const;
125 };
126 
127 class LinearBurnBlending: public IndependentChannelBlending
128 {
129  virtual qreal blendChannel( qreal const bottomColorIntensity,
130  qreal const topColorIntensity ) const;
131 };
132 
133 class MultiplyBlending: public IndependentChannelBlending
134 {
135  virtual qreal blendChannel( qreal const bottomColorIntensity,
136  qreal const topColorIntensity ) const;
137 };
138 
139 class SubtractiveBlending: public IndependentChannelBlending
140 {
141  virtual qreal blendChannel( qreal const bottomColorIntensity,
142  qreal const topColorIntensity ) const;
143 };
144 
145 
146 // Lightening blendings
147 
148 class AdditiveBlending: public IndependentChannelBlending
149 {
150  virtual qreal blendChannel( qreal const bottomColorIntensity,
151  qreal const topColorIntensity ) const;
152 };
153 
154 class ColorDodgeBlending: public IndependentChannelBlending
155 {
156  virtual qreal blendChannel( qreal const bottomColorIntensity,
157  qreal const topColorIntensity ) const;
158 };
159 
160 class GammaLightBlending: public IndependentChannelBlending
161 {
162  virtual qreal blendChannel( qreal const bottomColorIntensity,
163  qreal const topColorIntensity ) const;
164 };
165 
166 class HardLightBlending: public IndependentChannelBlending
167 {
168  virtual qreal blendChannel( qreal const bottomColorIntensity,
169  qreal const topColorIntensity ) const;
170 };
171 
172 class LightBlending: public IndependentChannelBlending
173 {
174  virtual qreal blendChannel( qreal const bottomColorIntensity,
175  qreal const topColorIntensity ) const;
176 };
177 
178 class LightenBlending: public IndependentChannelBlending
179 {
180  virtual qreal blendChannel( qreal const bottomColorIntensity,
181  qreal const topColorIntensity ) const;
182 };
183 
184 class PinLightBlending: public IndependentChannelBlending
185 {
186  virtual qreal blendChannel( qreal const bottomColorIntensity,
187  qreal const topColorIntensity ) const;
188 };
189 
190 class ScreenBlending: public IndependentChannelBlending
191 {
192  virtual qreal blendChannel( qreal const bottomColorIntensity,
193  qreal const topColorIntensity ) const;
194 };
195 
196 class SoftLightBlending: public IndependentChannelBlending
197 {
198  virtual qreal blendChannel( qreal const bottomColorIntensity,
199  qreal const topColorIntensity ) const;
200 };
201 
202 class VividLightBlending: public IndependentChannelBlending
203 {
204  virtual qreal blendChannel( qreal const bottomColorIntensity,
205  qreal const topColorIntensity ) const;
206 };
207 
208 
209 // Inverter blendings
210 
211 class AdditiveSubtractiveBlending: public IndependentChannelBlending
212 {
213  virtual qreal blendChannel( qreal const bottomColorIntensity,
214  qreal const topColorIntensity ) const;
215 };
216 
217 class BleachBlending: public IndependentChannelBlending
218 {
219  virtual qreal blendChannel( qreal const bottomColorIntensity,
220  qreal const topColorIntensity ) const;
221 };
222 
223 class DifferenceBlending: public IndependentChannelBlending
224 {
225  virtual qreal blendChannel( qreal const bottomColorIntensity,
226  qreal const topColorIntensity ) const;
227 };
228 
229 class EquivalenceBlending: public IndependentChannelBlending
230 {
231  virtual qreal blendChannel( qreal const bottomColorIntensity,
232  qreal const topColorIntensity ) const;
233 };
234 
235 class HalfDifferenceBlending: public IndependentChannelBlending
236 {
237  virtual qreal blendChannel( qreal const bottomColorIntensity,
238  qreal const topColorIntensity ) const;
239 };
240 
241 
242 // Special purpose blendings
243 
244 class CloudsBlending: public Blending
245 {
246  public:
247  virtual void blend( QImage * const bottom, TextureTile const * const top ) const;
248 };
249 
250 class GrayscaleBlending: public Blending
251 {
252  public:
253  virtual void blend( QImage * const bottom, TextureTile const * const top ) const;
254 };
255 
256 }
257 
258 #endif
Marble::DarkBlending
Definition: BlendingAlgorithms.h:103
Marble::SoftLightBlending
Definition: BlendingAlgorithms.h:196
Marble::CloudsBlending::blend
virtual void blend(QImage *const bottom, TextureTile const *const top) const
Definition: BlendingAlgorithms.cpp:323
Marble::DivideBlending
Definition: BlendingAlgorithms.h:115
Marble::IndependentChannelBlending
Definition: BlendingAlgorithms.h:32
Marble::GammaLightBlending
Definition: BlendingAlgorithms.h:160
Marble::Blending
Definition: Blending.h:25
Marble::BleachBlending
Definition: BlendingAlgorithms.h:217
Marble::VividLightBlending
Definition: BlendingAlgorithms.h:202
Marble::TextureTile
A class that resembles an image tile (extends Tile).
Definition: TextureTile.h:60
Marble::LinearBurnBlending
Definition: BlendingAlgorithms.h:127
Marble::ScreenBlending
Definition: BlendingAlgorithms.h:190
Marble::GrayscaleBlending
Definition: BlendingAlgorithms.h:250
Marble::GrayscaleBlending::blend
virtual void blend(QImage *const bottom, TextureTile const *const top) const
Definition: BlendingAlgorithms.cpp:41
Marble::LightBlending
Definition: BlendingAlgorithms.h:172
Marble::TextureBlending
Definition: BlendingAlgorithms.h:88
Marble::NoiseBlending
Definition: BlendingAlgorithms.h:72
Marble::CloudsBlending
Definition: BlendingAlgorithms.h:244
Marble::SubtractiveBlending
Definition: BlendingAlgorithms.h:139
Marble::MultiplyBlending
Definition: BlendingAlgorithms.h:133
Marble::ColorDodgeBlending
Definition: BlendingAlgorithms.h:154
Marble::LightenBlending
Definition: BlendingAlgorithms.h:178
Marble::DifferenceBlending
Definition: BlendingAlgorithms.h:223
Marble::IndependentChannelBlending::blend
virtual void blend(QImage *const bottom, TextureTile const *const top) const
Definition: BlendingAlgorithms.cpp:68
Marble::OverpaintBlending
Definition: BlendingAlgorithms.h:26
Marble::OverpaintBlending::blend
virtual void blend(QImage *const bottom, TextureTile const *const top) const
Definition: BlendingAlgorithms.cpp:28
Marble::GammaDarkBlending
Definition: BlendingAlgorithms.h:121
Marble::HalfDifferenceBlending
Definition: BlendingAlgorithms.h:235
Marble::ParallelBlending
Definition: BlendingAlgorithms.h:82
Blending.h
Marble::ArcusTangentBlending
Definition: BlendingAlgorithms.h:54
Marble::OverlayBlending
Definition: BlendingAlgorithms.h:76
Marble::PinLightBlending
Definition: BlendingAlgorithms.h:184
Marble::AdditiveSubtractiveBlending
Definition: BlendingAlgorithms.h:211
Marble::AllanonBlending
Definition: BlendingAlgorithms.h:48
Marble::LinearLightBlending
Definition: BlendingAlgorithms.h:66
Marble::DarkenBlending
Definition: BlendingAlgorithms.h:109
Marble::AdditiveBlending
Definition: BlendingAlgorithms.h:148
Marble::GeometricMeanBlending
Definition: BlendingAlgorithms.h:60
Marble::EquivalenceBlending
Definition: BlendingAlgorithms.h:229
Marble::HardLightBlending
Definition: BlendingAlgorithms.h:166
Marble::ColorBurnBlending
Definition: BlendingAlgorithms.h:97
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal