File indexing completed on 2024-05-12 15:56:41
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KO_GRADIENT_HELPER_H 0008 #define KO_GRADIENT_HELPER_H 0009 0010 #include <kritaflake_export.h> 0011 0012 #include <QGradient> 0013 0014 namespace KoGradientHelper 0015 { 0016 /// creates default gradient 0017 KRITAFLAKE_EXPORT QGradient *defaultGradient(QGradient::Type type, QGradient::Spread spread, const QGradientStops &stops); 0018 0019 /// Converts gradient type, preserving as much data as possible 0020 KRITAFLAKE_EXPORT QGradient *convertGradient(const QGradient *gradient, QGradient::Type newType); 0021 0022 /// Calculates color at given position from given gradient stops 0023 KRITAFLAKE_EXPORT QColor colorAt(qreal position, const QGradientStops &stops); 0024 } 0025 0026 #endif