Krita Source Code Documentation
Loading...
Searching...
No Matches
KoShapeGradientHandles.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KOSHAPEGRADIENTHANDLES_H
8#define KOSHAPEGRADIENTHANDLES_H
9
10#include <QPointF>
11#include <QGradient>
12#include <KoFlake.h>
13
14class KoShape;
15class KoViewConverter;
16class KUndo2Command;
17
19{
20public:
21 struct Handle {
30
32 Handle(Type t, const QPointF &p) : type(t), pos(p) {}
33
35 QPointF pos;
36 };
37
38public:
41 QGradient::Type type() const;
42
43 KUndo2Command* moveGradientHandle(Handle::Type handleType, const QPointF &absoluteOffset);
44 Handle getHandle(Handle::Type handleType);
45
46
47
48private:
49 const QGradient* gradient() const;
50 QPointF getNewHandlePos(const QPointF &oldPos, const QPointF &absoluteOffset, QGradient::CoordinateMode mode);
51
52private:
55};
56
57#endif // KOSHAPEGRADIENTHANDLES_H
const Params2D p
const QGradient * gradient() const
KoShapeGradientHandles(KoFlake::FillVariant fillVariant, KoShape *shape)
KUndo2Command * moveGradientHandle(Handle::Type handleType, const QPointF &absoluteOffset)
Handle getHandle(Handle::Type handleType)
QGradient::Type type() const
QPointF getNewHandlePos(const QPointF &oldPos, const QPointF &absoluteOffset, QGradient::CoordinateMode mode)
QVector< Handle > handles() const
KoFlake::FillVariant m_fillVariant
FillVariant
Definition KoFlake.h:28