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
18class QPointF;
19class QRectF;
20class QRect;
21class QPainterPath;
22class QPen;
23class KoColor;
25
28
29
31{
32public:
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
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
68private:
69 template <class Func>
70 inline void applyToAllPainters(Func func);
71
72private:
73 KisFreehandStrokeInfo *m_stroke = 0;
75};
76
77#endif // KISMASKEDPAINTINGSTROKEDATA_H
QSharedPointer< KisPaintOpPreset > KisPaintOpPresetSP
static void paintBezierCurve(KisPaintOp *paintOp, const KisPaintInformation &pi1, const KisVector2D &control1, const KisVector2D &control2, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance)