Krita Source Code Documentation
Loading...
Searching...
No Matches
KisDitherUtil.h
Go to the documentation of this file.
1
/*
2
* This file is part of the KDE project
3
*
4
* SPDX-FileCopyrightText: 2019 Carl Olsson <carl.olsson@gmail.com>
5
*
6
* SPDX-License-Identifier: GPL-2.0-or-later
7
*/
8
9
#ifndef KIS_DITHER_UTIL_H
10
#define KIS_DITHER_UTIL_H
11
12
#include <kritaui_export.h>
13
14
#include <
kis_types.h
>
15
16
#include <
KoPattern.h
>
17
18
class
KisPropertiesConfiguration
;
19
20
class
KRITAUI_EXPORT
KisDitherUtil
21
{
22
public
:
23
enum
ThresholdMode
{
24
Pattern
,
25
Noise
26
};
27
enum
PatternValueMode
{
28
Auto
,
29
Lightness
,
30
Alpha
31
};
32
33
KisDitherUtil
();
34
void
setConfiguration(
const
KisFilterConfiguration
&config,
const
QString &prefix =
""
);
35
qreal threshold(
const
QPoint &pos);
36
37
private
:
38
39
void
setThresholdMode(
const
ThresholdMode thresholdMode);
40
void
setPattern(
const
QString &md5sum,
const
QString &patternName,
const
PatternValueMode valueMode,
KisResourcesInterfaceSP
resourcesInterface);
41
void
setNoiseSeed(
const
quint64 &noiseSeed);
42
void
setSpread(
const
qreal &spread);
43
44
45
private
:
46
ThresholdMode
m_thresholdMode
;
47
PatternValueMode
m_patternValueMode
;
48
KoPatternSP
m_pattern
;
49
quint64
m_noiseSeed
;
50
bool
m_patternUseAlpha
;
51
qreal
m_spread
;
52
};
53
54
#endif
KoPattern.h
KisDitherUtil
Definition
KisDitherUtil.h:21
KisDitherUtil::m_patternUseAlpha
bool m_patternUseAlpha
Definition
KisDitherUtil.h:50
KisDitherUtil::ThresholdMode
ThresholdMode
Definition
KisDitherUtil.h:23
KisDitherUtil::Pattern
@ Pattern
Definition
KisDitherUtil.h:24
KisDitherUtil::m_noiseSeed
quint64 m_noiseSeed
Definition
KisDitherUtil.h:49
KisDitherUtil::m_spread
qreal m_spread
Definition
KisDitherUtil.h:51
KisDitherUtil::m_patternValueMode
PatternValueMode m_patternValueMode
Definition
KisDitherUtil.h:47
KisDitherUtil::m_thresholdMode
ThresholdMode m_thresholdMode
Definition
KisDitherUtil.h:46
KisDitherUtil::m_pattern
KoPatternSP m_pattern
Definition
KisDitherUtil.h:48
KisDitherUtil::PatternValueMode
PatternValueMode
Definition
KisDitherUtil.h:27
KisDitherUtil::Lightness
@ Lightness
Definition
KisDitherUtil.h:29
KisDitherUtil::Auto
@ Auto
Definition
KisDitherUtil.h:28
QSharedPointer< KisResourcesInterface >
kis_types.h
KisFilterConfiguration
Definition
kis_filter_configuration.cc:25
KisPropertiesConfiguration
Definition
kis_properties_configuration.cc:26
libs
ui
utils
KisDitherUtil.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52