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#include <KisHandleStyle.h>
18
19class KoSvgTextShape;
25class KRITAFLAKE_EXPORT KoSvgTextShapeOutlineHelper
26{
27public:
30
31 void paint(QPainter *painter, const KoViewConverter &converter);
32
37 QRectF decorationRect();
38
44 void setDrawBoundingRect(bool enable);
45 bool drawBoundingRect() const;
46
53 void setDrawTextWrappingArea(bool enable);
55
60 void setDrawShapeOutlines(bool enable);
61 bool drawShapeOutlines() const;
62
63 void setHandleRadius(int radius);
64 void setDecorationThickness(int thickness);
65
66 KoSvgTextShape *contourModeButtonHovered(const QPointF &point);
67
74 bool updateTextContourMode();
75
76 void toggleTextContourMode(KoSvgTextShape *shape);
77
78 void setTextAreasHovered(bool enabled);
79
80private:
81 void paintTextShape(QPainter *painter, const KoViewConverter &converter, 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