Debian Codegraph @

libs/ui/tool/kis_figure_painting_tool_helper.h

raw symbols SCIP
1 /*
2 * SPDX-FileCopyrightText: 2011 Dmitry Kazakov <[email protected]>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef __KIS_FIGURE_PAINTING_TOOL_HELPER_H
8 #define __KIS_FIGURE_PAINTING_TOOL_HELPER_H
9
10 #include "kis_types.h"
11 #include "kritaui_export.h"
12 #include <brushengine/kis_paint_information.h>
13 #include "strokes/freehand_stroke.h"
14 #include "KisToolShapeUtils.h"
15
16 class KoCanvasResourceProvider;
17 class KisStrokesFacade;
18
19 class KRITAUI_EXPORT KisFigurePaintingToolHelper
20 {
21 public:
22 KisFigurePaintingToolHelper(const KUndo2MagicString &name,
23 KisImageWSP image,
24 KisNodeSP currentNode,
25 KoCanvasResourceProvider *resourceManager,
26 KisToolShapeUtils::StrokeStyle strokeStyle,
27 KisToolShapeUtils::FillStyle fillStyle,
28 QTransform fillTransform = QTransform());
29 ~KisFigurePaintingToolHelper();
30
31 void paintLine(const KisPaintInformation &pi0,
32 const KisPaintInformation &pi1);
33 void paintPolyline(const vQPointF &points);
34 void paintPolygon(const vQPointF &points);
35 void paintRect(const QRectF &rect);
36 void paintEllipse(const QRectF &rect);
37 void paintPainterPath(const QPainterPath &path);
38 void setFGColorOverride(const KoColor &color);
39 void setBGColorOverride(const KoColor &color);
40 void setSelectionOverride(KisSelectionSP m_selection);
41 void setBrush(const KisPaintOpPresetSP &brush);
42 void paintPainterPathQPen(const QPainterPath, const QPen &pen, const KoColor &color);
43 void paintPainterPathQPenFill(const QPainterPath, const QPen &pen, const KoColor &color);
44
45 private:
46 void setupPaintStyles(KisResourcesSnapshotSP resources,
47 KisToolShapeUtils::StrokeStyle strokeStyle,
48 KisToolShapeUtils::FillStyle fillStyle,
49 QTransform fillTransform);
50
51 private:
52 KisStrokeId m_strokeId;
53 KisResourcesSnapshotSP m_resources;
54 KisStrokesFacade *m_strokesFacade;
55 };
56
57 #endif /* __KIS_FIGURE_PAINTING_TOOL_HELPER_H */