Krita Source Code Documentation
Loading...
Searching...
No Matches
SelectionDecorator.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2
3 SPDX-FileCopyrightText: 2006 Thorsten Zachmann <zachmann@kde.org>
4 SPDX-FileCopyrightText: 2006-2007 Thomas Zander <zander@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef SELECTIONDECORATOR_H
10#define SELECTIONDECORATOR_H
11
12#include <KoViewConverter.h>
13#include <KoFlake.h>
14
16
17#include <QPainter>
18
19class KoSelection;
21
22static const struct DecoratorIconPositions {
23 QPoint uiOffset = QPoint(0, 40);
25
30{
31public:
40
46 void paint(QPainter &painter, const KoViewConverter &converter);
47
52 void setSelection(KoSelection *selection);
53
58 void setHandleRadius(int radius);
59
64 void setDecorationThickness(int thickness);
65
71
77
80 const KoShapeMeshGradientHandles::Handle &hoveredHandle);
81
83
84private:
85 void paintGradientHandles(KoShape *shape, KoFlake::FillVariant fillVariant, QPainter &painter, const KoViewConverter &converter);
86
87 void paintMeshGradientHandles(KoShape *shape, KoFlake::FillVariant fillVariant, QPainter &painter, const KoViewConverter &converter);
88
89private:
100};
101
102#endif
float value(const T *src, size_t ch)
static const struct DecoratorIconPositions decoratorIconPositions
void setDecorationThickness(int thickness)
void paintGradientHandles(KoShape *shape, KoFlake::FillVariant fillVariant, QPainter &painter, const KoViewConverter &converter)
void setCurrentMeshGradientHandles(const KoShapeMeshGradientHandles::Handle &selectedHandle, const KoShapeMeshGradientHandles::Handle &hoveredHandle)
SelectionDecorator(KoCanvasResourceProvider *resourceManager)
void paint(QPainter &painter, const KoViewConverter &converter)
void setSelection(KoSelection *selection)
KoFlake::AnchorPosition m_hotPosition
void paintMeshGradientHandles(KoShape *shape, KoFlake::FillVariant fillVariant, QPainter &painter, const KoViewConverter &converter)
void setShowFillMeshGradientHandles(bool value)
void setForceShapeOutlines(bool value)
KoSelection * m_selection
void setShowStrokeFillGradientHandles(bool value)
void setHandleRadius(int radius)
KoShapeMeshGradientHandles::Handle m_selectedMeshHandle
KoShapeMeshGradientHandles::Handle m_currentHoveredMeshHandle
void setShowFillGradientHandles(bool value)
AnchorPosition
Definition KoFlake.h:85
FillVariant
Definition KoFlake.h:28