Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_figure_painting_tool_helper.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2011 Dmitry Kazakov <dimula73@gmail.com>
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 */
KisToolShapeUtils.h
KUndo2MagicString
Definition
kundo2magicstring.h:40
KisFigurePaintingToolHelper
Definition
kis_figure_painting_tool_helper.h:20
KisFigurePaintingToolHelper::m_resources
KisResourcesSnapshotSP m_resources
Definition
kis_figure_painting_tool_helper.h:53
KisFigurePaintingToolHelper::m_strokesFacade
KisStrokesFacade * m_strokesFacade
Definition
kis_figure_painting_tool_helper.h:54
KisFigurePaintingToolHelper::m_strokeId
KisStrokeId m_strokeId
Definition
kis_figure_painting_tool_helper.h:52
KisPaintInformation
Definition
kis_paint_information.h:51
KisSharedPtr< KisNode >
KisStrokesFacade
Definition
kis_image_interfaces.h:21
KisWeakSharedPtr< KisImage >
KoCanvasResourceProvider
Definition
KoCanvasResourceProvider.cpp:38
KoColor
Definition
KoColor.h:31
QList
Definition
KisQStringListFwd.h:16
QSharedPointer< KisPaintOpPreset >
QWeakPointer
Definition
kis_uniform_paintop_property.h:72
freehand_stroke.h
kis_paint_information.h
kis_types.h
KisToolShapeUtils::FillStyle
FillStyle
Definition
KisToolShapeUtils.h:13
KisToolShapeUtils::StrokeStyle
StrokeStyle
Definition
KisToolShapeUtils.h:20
rect
Definition
xcftools.h:129
libs
ui
tool
kis_figure_painting_tool_helper.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52