Marble
BlendingAlgorithms.cpp
37 QImage const topImagePremult = top->image()->convertToFormat(QImage::Format_ARGB32_Premultiplied);
60 QImage const topImagePremult = top->image()->convertToFormat(QImage::Format_ARGB32_Premultiplied);
69 QRgb const invertedPixel = qRgb(255 - qRed(topPixel), 255 - qGreen(topPixel), 255 - qBlue(topPixel));
82 QImage const topImagePremult = top->image()->convertToFormat(QImage::Format_ARGB32_Premultiplied);
129qreal AllanonBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
134qreal ArcusTangentBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
139qreal GeometricMeanBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
144qreal LinearLightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
146 return qMin(qreal(1.0), qMax(qreal(0.0), qreal(bottomColorIntensity + 2.0 * topColorIntensity - 1.0)));
149qreal OverlayBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
157qreal ParallelBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
161 // FIXME: return qMin( qMax( 2.0 / ( 1.0 / bottomColorIntensity + 1.0 / topColorIntensity )), 0.0, 1.0 );
165qreal TextureBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
175qreal ColorBurnBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
180 return qMin(qreal(1.0), qMax(qreal(0.0), qreal(1.0 - (1.0 - bottomColorIntensity) / topColorIntensity)));
183qreal DarkBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
188qreal DarkenBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
194qreal DivideBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
199qreal GammaDarkBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
204qreal LinearBurnBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
209qreal MultiplyBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
214qreal SubtractiveBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
221qreal AdditiveBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
226qreal ColorDodgeBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
228 return qMin(qreal(1.0), qMax(qreal(0.0), qreal(bottomColorIntensity / (1.0 - topColorIntensity))));
231qreal GammaLightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
236qreal HardLightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
238 return topColorIntensity < 0.5 ? 2.0 * bottomColorIntensity * topColorIntensity : 1.0 - 2.0 * (1.0 - bottomColorIntensity) * (1.0 - topColorIntensity);
241qreal LightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
246qreal LightenBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
252qreal PinLightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
254 return qMax(qreal(0.0), qMax(qreal(2.0 + topColorIntensity - 1.0), qMin(bottomColorIntensity, qreal(2.0 * topColorIntensity))));
257qreal ScreenBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
262qreal SoftLightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
267qreal VividLightBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
269 return topColorIntensity < 0.5 ? qMin(qreal(1.0), qMax(qreal(0.0), qreal(1.0 - (1.0 - bottomColorIntensity) / (2.0 * topColorIntensity))))
270 : qMin(qreal(1.0), qMax(qreal(0.0), qreal(bottomColorIntensity / (2.0 * (1.0 - topColorIntensity)))));
275qreal AdditiveSubtractiveBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
285qreal BleachBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
291qreal DifferenceBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
293 return qMax(qMin(qreal(1.0), qreal(bottomColorIntensity - topColorIntensity + 0.5)), qreal(0.0));
296qreal EquivalenceBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
301qreal HalfDifferenceBlending::blendChannel(qreal const bottomColorIntensity, qreal const topColorIntensity) const
303 return bottomColorIntensity + topColorIntensity - 2.0 * (bottomColorIntensity * topColorIntensity);
325 qRgb((int)(bottomRed + (255 - bottomRed) * c), (int)(bottomGreen + (255 - bottomGreen) * c), (int)(bottomBlue + (255 - bottomBlue) * c)));
KGUIADDONS_EXPORT qreal hue(const QColor &)
Binds a QML item to a specific geodetic location in screen coordinates.
Definition AbstractDataPlugin.cpp:23
QColor fromHsl(int h, int s, int l, int a)
QRgb rgb() const const
Format_ARGB32_Premultiplied
QImage convertToFormat(Format format, Qt::ImageConversionFlags flags) &&
Format format() const const
int height() const const
QRgb pixel(const QPoint &position) const const
void setPixel(const QPoint &position, uint index_or_rgb)
QSize size() const const
int width() const const
gray
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.