4#ifndef GRADIENTIMAGEPARAMETERS_H
5#define GRADIENTIMAGEPARAMETERS_H
11#include <qsharedpointer.h>
16class AsyncImageRenderCallback;
40struct GradientImageParameters final {
42 explicit GradientImageParameters();
43 [[nodiscard]]
bool operator==(
const GradientImageParameters &other)
const;
44 [[nodiscard]]
bool operator!=(
const GradientImageParameters &other)
const;
49 [[nodiscard]] LchaDouble colorFromValue(qreal value)
const;
50 static void render(
const QVariant &variantParameters, AsyncImageRenderCallback &callbackObject);
51 void setDevicePixelRatioF(
const qreal newDevicePixelRatioF);
52 void setFirstColor(
const LchaDouble &newFirstColor);
53 void setGradientLength(
const int newGradientLength);
54 void setGradientThickness(
const int newGradientThickness);
55 void setSecondColor(
const LchaDouble &newFirstColor);
59 friend class TestGradientImageParameters;
62 [[nodiscard]]
static LchaDouble completlyNormalizedAndBounded(
const LchaDouble &color);
63 void updateSecondColor();
69 qreal m_devicePixelRatioF = 1;
74 LchaDouble m_firstColorCorrected;
79 int m_gradientLength = 0;
84 int m_gradientThickness = 0;
108 LchaDouble m_secondColorCorrectedAndAltered;
113Q_DECLARE_METATYPE(PerceptualColor::GradientImageParameters)
The namespace of this library.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Sep 13 2024 11:47:58 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.