File indexing completed on 2024-05-12 15:56:48
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KOSHAPEFILLWRAPPER_H 0008 #define KOSHAPEFILLWRAPPER_H 0009 0010 #include "kritaflake_export.h" 0011 #include <QScopedPointer> 0012 #include <QList> 0013 #include <KoFlake.h> 0014 0015 class KUndo2Command; 0016 class KoShape; 0017 class QColor; 0018 class QTransform; 0019 class QGradient; 0020 class SvgMeshGradient; 0021 0022 class KRITAFLAKE_EXPORT KoShapeFillWrapper 0023 { 0024 public: 0025 KoShapeFillWrapper(KoShape *shape, KoFlake::FillVariant fillVariant); 0026 KoShapeFillWrapper(QList<KoShape*> shapes, KoFlake::FillVariant fillVariant); 0027 0028 ~KoShapeFillWrapper(); 0029 0030 bool isMixedFill() const; 0031 KoFlake::FillType type() const; 0032 0033 QColor color() const; 0034 const QGradient* gradient() const; 0035 QTransform gradientTransform() const; 0036 bool hasZeroLineWidth() const; 0037 const SvgMeshGradient* meshgradient() const; 0038 0039 KUndo2Command* setColor(const QColor &color); 0040 KUndo2Command* setLineWidth(const float &lineWidth); 0041 0042 KUndo2Command* setGradient(const QGradient *gradient, const QTransform &transform); 0043 KUndo2Command* applyGradient(const QGradient *gradient); 0044 KUndo2Command* applyGradientStopsOnly(const QGradient *gradient); 0045 0046 KUndo2Command* setMeshGradient(const SvgMeshGradient *gradient, const QTransform &transform); 0047 0048 private: 0049 struct Private; 0050 const QScopedPointer<Private> m_d; 0051 }; 0052 0053 #endif // KOSHAPEFILLWRAPPER_H