Krita Source Code Documentation
Loading...
Searching...
No Matches
KisEncloseAndFillProcessingVisitor.h
Go to the documentation of this file.
1/*
2 * KDE. Krita Project.
3 *
4 * SPDX-FileCopyrightText: 2022 Deif Lou <ginoba@gmail.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef KISENCLOSEANDFILLPROCESSINGVISITOR_H
10#define KISENCLOSEANDFILLPROCESSINGVISITOR_H
11
12#include <QPoint>
13
15#include <kis_selection.h>
18#include <kritaui_export.h>
19
21{
22public:
24 KisPaintDeviceSP referencePaintDevice,
25 KisPixelSelectionSP enclosingMask,
26 KisSelectionSP selection,
27 KisResourcesSnapshotSP resources,
29 const KoColor &regionSelectionColor,
30 bool regionSelectionInvert,
31 bool regionSelectionIncludeContourRegions,
32 bool regionSelectionIncludeSurroundingRegions,
33 int fillThreshold,
34 int fillOpacitySpread,
35 int closeGap,
36 bool antiAlias,
37 int expand,
38 bool stopGrowingAtDarkestPixel,
39 int feather,
40 bool useSelectionAsBoundary,
41 bool usePattern,
42 bool unmerged,
43 bool useBgColor,
44 bool useCustomBlendingOptions,
45 qreal customOpacity,
46 const QString &customCompositeOp,
47 QSharedPointer<QRect> outDirtyRect
48 );
49
50private:
51 void visitNodeWithPaintDevice(KisNode *node, KisUndoAdapter *undoAdapter) override;
52 void visitExternalLayer(KisExternalLayer *layer, KisUndoAdapter *undoAdapter) override;
53 void visitColorizeMask(KisColorizeMask *mask, KisUndoAdapter *undoAdapter) override;
54
55 void fillPaintDevice(KisPaintDeviceSP device, KisUndoAdapter *undoAdapter, ProgressHelper &helper);
56
57private:
58 KisPaintDeviceSP m_referencePaintDevice {nullptr};
59 KisPixelSelectionSP m_enclosingMask {nullptr};
60 KisSelectionSP m_selection {nullptr};
61 KisResourcesSnapshotSP m_resources {nullptr};
64 bool m_regionSelectionInvert {false};
65 bool m_regionSelectionIncludeContourRegions {true};
66 bool m_regionSelectionIncludeSurroundingRegions {true};
67 int m_fillThreshold {8};
68 int m_fillOpacitySpread {100};
69 int m_closeGap {0};
70 bool m_useSelectionAsBoundary {true};
71 bool m_antiAlias {false};
72 int m_expand {0};
73 bool m_stopGrowingAtDarkestPixel {false};
74 int m_feather {0};
75 bool m_usePattern {false};
76 bool m_unmerged {false};
77 bool m_useBgColor {false};
82};
83
84#endif
void expand(ExpansionStrategy &expansionStrategy, KoUpdater *progressUpdater)
virtual void visitExternalLayer(KisExternalLayer *layer, KisUndoAdapter *undoAdapter)=0
virtual void visitNodeWithPaintDevice(KisNode *node, KisUndoAdapter *undoAdapter)=0
virtual void visitColorizeMask(KisColorizeMask *mask, KisUndoAdapter *undoAdapter)=0