Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tusooa Zhu
Krita
Commits
7f637e3f
Commit
7f637e3f
authored
Mar 04, 2015
by
Dmitry Kazakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix FilterStrokeTest
Add fuzziness
parent
ea13e179
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
krita/sdk/tests/stroke_testing_utils.cpp
krita/sdk/tests/stroke_testing_utils.cpp
+8
-3
krita/sdk/tests/stroke_testing_utils.h
krita/sdk/tests/stroke_testing_utils.h
+2
-0
krita/ui/tests/filter_stroke_test.cpp
krita/ui/tests/filter_stroke_test.cpp
+1
-0
No files found.
krita/sdk/tests/stroke_testing_utils.cpp
View file @
7f637e3f
...
...
@@ -124,12 +124,12 @@ KoCanvasResourceManager* utils::createResourceManager(KisImageWSP image,
return
manager
;
}
utils
::
StrokeTester
::
StrokeTester
(
const
QString
&
name
,
const
QSize
&
imageSize
,
const
QString
&
presetFilename
)
:
m_name
(
name
),
m_imageSize
(
imageSize
),
m_presetFilename
(
presetFilename
),
m_numIterations
(
1
)
m_numIterations
(
1
),
m_baseFuzziness
(
1
)
{
}
...
...
@@ -142,6 +142,11 @@ void utils::StrokeTester::setNumIterations(int value)
m_numIterations
=
value
;
}
void
utils
::
StrokeTester
::
setBaseFuzziness
(
int
value
)
{
m_baseFuzziness
=
value
;
}
void
utils
::
StrokeTester
::
test
()
{
testOneStroke
(
false
,
false
,
false
);
...
...
@@ -190,7 +195,7 @@ void utils::StrokeTester::testOneStroke(bool cancelled,
refImage
.
load
(
referenceFile
(
testName
));
QPoint
temp
;
if
(
!
TestUtil
::
compareQImages
(
temp
,
refImage
,
resultImage
,
1
,
1
))
{
if
(
!
TestUtil
::
compareQImages
(
temp
,
refImage
,
resultImage
,
m_baseFuzziness
,
m_baseFuzziness
))
{
refImage
.
save
(
dumpReferenceFile
(
testName
));
resultImage
.
save
(
resultFile
(
testName
));
...
...
krita/sdk/tests/stroke_testing_utils.h
View file @
7f637e3f
...
...
@@ -47,6 +47,7 @@ namespace utils {
void
benchmark
();
void
setNumIterations
(
int
value
);
void
setBaseFuzziness
(
int
value
);
protected:
KisStrokeId
strokeId
()
{
...
...
@@ -99,6 +100,7 @@ namespace utils {
QSize
m_imageSize
;
QString
m_presetFilename
;
int
m_numIterations
;
int
m_baseFuzziness
;
};
}
...
...
krita/ui/tests/filter_stroke_test.cpp
View file @
7f637e3f
...
...
@@ -35,6 +35,7 @@ public:
:
StrokeTester
(
QString
(
"filter_"
)
+
filterName
,
QSize
(
500
,
500
),
""
),
m_filterName
(
filterName
)
{
setBaseFuzziness
(
5
);
}
protected:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment