Krita Source Code Documentation
Loading...
Searching...
No Matches
KoGradientHelper.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KO_GRADIENT_HELPER_H
8#define KO_GRADIENT_HELPER_H
9
10#include <kritaflake_export.h>
11
12#include <QGradient>
13
15{
17KRITAFLAKE_EXPORT QGradient *defaultGradient(QGradient::Type type, QGradient::Spread spread, const QGradientStops &stops);
18
20KRITAFLAKE_EXPORT QGradient *convertGradient(const QGradient *gradient, QGradient::Type newType);
21
23KRITAFLAKE_EXPORT QColor colorAt(qreal position, const QGradientStops &stops);
24}
25
26#endif
KRITAFLAKE_EXPORT QGradient * convertGradient(const QGradient *gradient, QGradient::Type newType)
Converts gradient type, preserving as much data as possible.
KRITAFLAKE_EXPORT QColor colorAt(qreal position, const QGradientStops &stops)
Calculates color at given position from given gradient stops.
KRITAFLAKE_EXPORT QGradient * defaultGradient(QGradient::Type type, QGradient::Spread spread, const QGradientStops &stops)
creates default gradient