Fixed: 'canvas difference area' is not included in mask.#6
Fixed: 'canvas difference area' is not included in mask.#6subiron merged 7 commits intowttech:masterfrom subiron:master
Conversation
Improve mask feature by marking canvas-only difference as yellow. Include canvas diff in differenceCounter. Updated unit test for fix and new mask feature.
| @@ -48,6 +46,8 @@ public final class ImageComparison { | |||
|
|
|||
| private static final int INVALID_PIXEL_COLOR = 125 << ALPHA_SHIFT | 255 << RED_SHIFT | 0 << GREEN_SHIFT | 0; | |||
There was a problem hiding this comment.
Could we have somethiing like this here?:
int rgba = new java.awt.Color(r,g,b,a).getRGB();
malaskowski
left a comment
There was a problem hiding this comment.
Very good idea! I've added some cosmetics comments.
|
|
||
| // Sets not covered areas as error (red) | ||
| fastMarkOuterAreaAsError(minWidth, minHeight, widthDifference, heightDifference, | ||
| differenceCounter += fastMarkOuterAreaAsError(minWidth, minHeight, widthDifference, heightDifference, |
There was a problem hiding this comment.
I'm wondering - but it is probably a good idea to count outer area as errors.
Please update comment above in line 82.
There was a problem hiding this comment.
i was thinking about saving "canvas-diff" value in separate field but
what's the reason ?
As far as I know we even don't show differenceCounter in report ;]
| } | ||
|
|
||
| @Test | ||
| public void testCompare_different_canvas() throws Exception { |
There was a problem hiding this comment.
Please rename this test to meet the convention e.g. to:
compare_differentHeightScreenshots_expectHeightDifferenceMarkedWithYellow .
fixed not filling right bottom corner
| writableRaster.setDataElements(minWidth, 0, widthDifference, resultHeight, emptyAreaA); | ||
|
|
||
| // fil area [0, minHeight, minWidth, resultHeight] | ||
| // fil bottom area |
There was a problem hiding this comment.
fil bottom area
->
fill bottom area
?
There was a problem hiding this comment.
fixed... but,are you familiar with "Allow edits from maintainers." feture in github?
It's not enabled by default for no reason ;)
|
Please update documentation. |
Fixed: 'canvas difference area' is not included in mask.
Improve mask feature by marking canvas-only difference as yellow.
Include canvas diff in differenceCounter.
Updated unit test for fix and new mask feature.