4#ifndef GRADIENTIMAGEPARAMETERS_H
5#define GRADIENTIMAGEPARAMETERS_H
7#include "genericcolor.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]] GenericColor colorFromValue(qreal value)
const;
50 static void render(
const QVariant &variantParameters, AsyncImageRenderCallback &callbackObject);
51 void setDevicePixelRatioF(
const qreal newDevicePixelRatioF);
52 void setFirstColorCieLchD50A(
const GenericColor &newFirstColor);
53 void setGradientLength(
const int newGradientLength);
54 void setGradientThickness(
const int newGradientThickness);
55 void setSecondColorCieLchD50A(
const GenericColor &newFirstColor);
59 friend class TestGradientImageParameters;
62 [[nodiscard]]
static GenericColor completlyNormalizedAndBounded(
const GenericColor &color);
63 void updateSecondColor();
69 qreal m_devicePixelRatioF = 1;
74 GenericColor m_firstColorCorrected;
79 int m_gradientLength = 0;
84 int m_gradientThickness = 0;
108 GenericColor 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 Mon Nov 18 2024 12:18:38 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.