Krita Source Code Documentation
Loading...
Searching...
No Matches
KoSvgTextShapeOutlineHelper.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KOSVGTEXTSHAPEOUTLINEHELPER_H
7#define KOSVGTEXTSHAPEOUTLINEHELPER_H
8
9#include <KoCanvasBase.h>
10#include <KoViewConverter.h>
11
12#include <QPainter>
13#include <QPointF>
14#include <QScopedPointer>
15
16#include <kritaflake_export.h>
17
18class KoSvgTextShape;
24class KRITAFLAKE_EXPORT KoSvgTextShapeOutlineHelper
25{
26public:
29
30 void paint(QPainter *painter, const KoViewConverter &converter);
31
36 QRectF decorationRect();
37
43 void setDrawBoundingRect(bool enable);
44 bool drawBoundingRect() const;
45
52 void setDrawTextWrappingArea(bool enable);
54
59 void setDrawShapeOutlines(bool enable);
60 bool drawShapeOutlines() const;
61
62 void setHandleRadius(int radius);
63 void setDecorationThickness(int thickness);
64
65 KoSvgTextShape *contourModeButtonHovered(const QPointF &point);
66
73 bool updateTextContourMode();
74
75 void toggleTextContourMode(KoSvgTextShape *shape);
76
77 void setTextAreasHovered(bool enabled);
78
79private:
80 void paintTextShape(QPainter *painter, const KoViewConverter &converter,
81 const QPalette &pal, KoSvgTextShape *text,
82 bool contourModeActive = false);
83 struct Private;
84 QScopedPointer<Private> d;
85};
86
87#endif // KOSVGTEXTSHAPEOUTLINEHELPER_H
The KoSvgTextShapeOutlineHelper class helper class that draws the text outlines and contour mode butt...
bool drawTextWrappingArea() const