Krita Source Code Documentation
Loading...
Searching...
No Matches
KisMaskedFreehandStrokePainter.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
3
*
4
* SPDX-License-Identifier: GPL-2.0-or-later
5
*/
6
7
#ifndef KISMASKEDPAINTINGSTROKEDATA_H
8
#define KISMASKEDPAINTINGSTROKEDATA_H
9
10
#include "kritaui_export.h"
11
12
#include <QVector>
13
#include <QSharedPointer>
14
15
class
KisFreehandStrokeInfo
;
16
class
KisPaintInformation
;
17
class
KisDistanceInformation
;
18
class
QPointF;
19
class
QRectF;
20
class
QRect;
21
class
QPainterPath;
22
class
QPen;
23
class
KoColor
;
24
class
KisRunnableStrokeJobData
;
25
26
class
KisPaintOpPreset
;
27
typedef
QSharedPointer<KisPaintOpPreset>
KisPaintOpPresetSP
;
28
29
30
class
KRITAUI_EXPORT
KisMaskedFreehandStrokePainter
31
{
32
public
:
33
KisMaskedFreehandStrokePainter
(
KisFreehandStrokeInfo
*strokeData,
KisFreehandStrokeInfo
*maskData);
34
35
// painter overrides
36
37
KisPaintOpPresetSP
preset()
const
;
38
39
void
paintAt(
const
KisPaintInformation
& pi);
40
41
void
paintLine(
const
KisPaintInformation
&pi1,
42
const
KisPaintInformation
&pi2);
43
44
void
paintBezierCurve
(
const
KisPaintInformation
&pi1,
45
const
QPointF &control1,
46
const
QPointF &control2,
47
const
KisPaintInformation
&pi2);
48
49
void
paintPolyline(
const
QVector<QPointF>
&points,
50
int
index = 0,
int
numPoints = -1);
51
52
void
paintPolygon(
const
QVector<QPointF>
&points);
53
void
paintRect(
const
QRectF &
rect
);
54
void
paintEllipse(
const
QRectF &
rect
);
55
void
paintPainterPath(
const
QPainterPath& path);
56
57
void
drawPainterPath(
const
QPainterPath& path,
const
QPen& pen);
58
void
drawAndFillPainterPath(
const
QPainterPath& path,
const
QPen& pen,
const
KoColor
&customColor);
59
60
// paintop overrides
61
62
std::pair<int, bool> doAsynchronousUpdate(
QVector<KisRunnableStrokeJobData*>
&jobs);
63
bool
hasDirtyRegion()
const
;
64
QVector<QRect>
takeDirtyRegion();
65
66
bool
hasMasking()
const
;
67
68
private
:
69
template
<
class
Func>
70
inline
void
applyToAllPainters(Func func);
71
72
private
:
73
KisFreehandStrokeInfo
*m_stroke = 0;
74
KisFreehandStrokeInfo
*m_mask = 0;
75
};
76
77
#endif
// KISMASKEDPAINTINGSTROKEDATA_H
KisPaintOpPresetSP
QSharedPointer< KisPaintOpPreset > KisPaintOpPresetSP
Definition
KisMaskedFreehandStrokePainter.h:27
KisFreehandStrokeInfo
Definition
KisFreehandStrokeInfo.h:21
KisMaskedFreehandStrokePainter
Definition
KisMaskedFreehandStrokePainter.h:31
KisPaintInformation
Definition
kis_paint_information.h:51
KisRunnableStrokeJobData
Definition
KisRunnableStrokeJobData.h:16
KoColor
Definition
KoColor.h:31
QList
Definition
KisQStringListFwd.h:16
QSharedPointer
Definition
KoCanvasResourceProvider.h:20
paintBezierCurve
static void paintBezierCurve(KisPaintOp *paintOp, const KisPaintInformation &pi1, const KisVector2D &control1, const KisVector2D &control2, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance)
Definition
kis_paintop.cc:98
KisDistanceInformation
Definition
kis_distance_information.cpp:29
KisPaintOpPreset
Definition
kis_paintop_preset.cpp:39
rect
Definition
xcftools.h:129
libs
ui
tool
strokes
KisMaskedFreehandStrokePainter.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52