@@ -5,7 +5,8 @@ import { INsCapabilities } from "./ins-capabilities";
5
5
export class ImageHelper {
6
6
7
7
private _cropImageRec : { x : number , y : number , width : number , height : number } ;
8
-
8
+ private _blockOutAreas : { x : number , y : number , width : number , height : number } [ ] ;
9
+
9
10
constructor ( private _args : INsCapabilities ) {
10
11
}
11
12
@@ -17,6 +18,14 @@ export class ImageHelper {
17
18
this . _cropImageRec = rect ;
18
19
}
19
20
21
+ get blockOutAreas ( ) {
22
+ return this . _blockOutAreas ;
23
+ }
24
+
25
+ set blockOutAreas ( rectangles : { x : number , y : number , width : number , height : number } [ ] ) {
26
+ this . _blockOutAreas = rectangles ;
27
+ }
28
+
20
29
public imageOutputLimit ( ) {
21
30
return ImageOptions . outputAll ;
22
31
}
@@ -38,7 +47,7 @@ export class ImageHelper {
38
47
}
39
48
40
49
public static cropImageDefaultParams ( _args : INsCapabilities ) {
41
- return { x : 0 , y : ImageHelper . getOffsetPixels ( _args ) } ;
50
+ return { x : 0 , y : ImageHelper . getOffsetPixels ( _args ) } ;
42
51
}
43
52
44
53
private runDiff ( diffOptions : blinkDiff , diffImage : string ) {
@@ -80,9 +89,12 @@ export class ImageHelper {
80
89
81
90
cropImageA : rectToCrop ,
82
91
cropImageB : rectToCrop ,
92
+ blockOut : this . _blockOutAreas ,
83
93
verbose : this . _args . verbose ,
84
94
} ) ;
85
95
86
- return this . runDiff ( diff , output ) ;
96
+ const result = this . runDiff ( diff , output ) ;
97
+ this . _blockOutAreas = undefined ;
98
+ return result ;
87
99
}
88
100
}
0 commit comments