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;
22
23static const struct DecoratorIconPositions {
24 QPoint uiOffset = QPoint(0, 40);
26
31{
32public:
41
47 void paint(QPainter &painter, const KoViewConverter &converter);
48
53 void setSelection(KoSelection *selection);
54
59 void setHandleRadius(int radius);
60
65 void setDecorationThickness(int thickness);
66
72
78
81 const KoShapeMeshGradientHandles::Handle &hoveredHandle);
82
84
85private:
86 void paintGradientHandles(KoShape *shape, KoFlake::FillVariant fillVariant, QPainter &painter, const KoViewConverter &converter);
87
88 void paintMeshGradientHandles(KoShape *shape, KoFlake::FillVariant fillVariant, QPainter &painter, const KoViewConverter &converter);
89
90private:
102};
103
104#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)
KoColorDisplayRendererInterface * m_rendererInterface
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)
SelectionDecorator(KoCanvasResourceProvider *resourceManager, KoColorDisplayRendererInterface *displayInterface)
KoShapeMeshGradientHandles::Handle m_selectedMeshHandle
KoShapeMeshGradientHandles::Handle m_currentHoveredMeshHandle
void setShowFillGradientHandles(bool value)
AnchorPosition
Definition KoFlake.h:85
FillVariant
Definition KoFlake.h:28