Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_lazy_fill_tools.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_LAZY_FILL_TOOLS_H
8#define __KIS_LAZY_FILL_TOOLS_H
9
10#include "kis_types.h"
11#include "kritaimage_export.h"
12#include <KoColor.h>
13
14#include <boost/operators.hpp>
15
16
17
18class KoColor;
19
20namespace KisLazyFillTools
21{
22 KRITAIMAGE_EXPORT
24
25 KRITAIMAGE_EXPORT
26 void normalizeAlpha8Device(KisPaintDeviceSP dev, const QRect &rect);
27
40 KRITAIMAGE_EXPORT
41 void cutOneWay(const KoColor &color,
43 KisPaintDeviceSP colorScribble,
44 KisPaintDeviceSP backgroundScribble,
45 KisPaintDeviceSP resultDevice,
46 KisPaintDeviceSP maskDevice,
47 const QRect &boundingRect);
48
56 KRITAIMAGE_EXPORT
58
59 struct KRITAIMAGE_EXPORT KeyStroke : public boost::equality_comparable<KeyStroke>
60 {
61 KeyStroke();
62 KeyStroke(KisPaintDeviceSP _dev, const KoColor &_color, bool isTransparent = false);
63
64 friend bool operator==(const KeyStroke& t1, const KeyStroke&t2);
65
69 };
70
71 struct KRITAIMAGE_EXPORT FilteringOptions : public boost::equality_comparable<FilteringOptions>
72 {
73 FilteringOptions() = default;
74 FilteringOptions(bool _useEdgeDetection, qreal _edgeDetectionSize, qreal _fuzzyRadius, qreal _cleanUpAmount);
75
76 friend bool operator==(const FilteringOptions &t1, const FilteringOptions &t2);
77
78 // default values for filtering: disabled
79 bool useEdgeDetection = false;
80 qreal edgeDetectionSize = 4;
81 qreal fuzzyRadius = 0;
82 qreal cleanUpAmount = 0.0;
83 };
84}
85
86#endif /* __KIS_LAZY_FILL_TOOLS_H */
bool operator==(const KisRegion &lhs, const KisRegion &rhs)
void cutOneWay(const KoColor &color, KisPaintDeviceSP src, KisPaintDeviceSP colorScribble, KisPaintDeviceSP backgroundScribble, KisPaintDeviceSP resultDevice, KisPaintDeviceSP maskDevice, const QRect &boundingRect)
void normalizeAndInvertAlpha8Device(KisPaintDeviceSP dev, const QRect &rect)
void normalizeAlpha8Device(KisPaintDeviceSP dev, const QRect &rect)
QVector< QPoint > splitIntoConnectedComponents(KisPaintDeviceSP dev, const QRect &boundingRect)