gsk: Add a node parser test for mask modes

This commit is contained in:
Matthias Clasen 2023-02-14 20:28:02 -05:00
parent 7e18c2849b
commit aec4bfcf3b
3 changed files with 92 additions and 0 deletions

View File

@ -207,6 +207,8 @@ node_parser_tests = [
'gradient-fail.node',
'gradient-fail.ref.node',
'gradient-fail.errors',
'mask-modes.node',
'mask-modes.ref.node',
'radial-gradient.node',
'radial-gradient.ref.node',
'repeating-linear-gradient.node',

View File

@ -0,0 +1,47 @@
mask {
mode: alpha;
source: color {
bounds: 0 0 30 30;
color: red;
}
mask: color {
bounds: 15 15 30 30;
color: white;
}
}
mask {
mode: inverted-alpha;
source: color {
bounds: 50 0 30 30;
color: lime;
}
mask: color {
bounds: 65 15 30 30;
color: white;
}
}
mask {
mode: luminance;
source: color {
bounds: 0 50 30 30;
color: yellow;
}
mask: color {
bounds: 15 65 30 30;
color: white;
}
}
mask {
mode: inverted-luminance;
source: color {
bounds: 50 50 30 30;
color: blue;
}
mask: color {
bounds: 65 65 30 30;
color: white;
}
}

View File

@ -0,0 +1,43 @@
mask {
source: color {
bounds: 0 0 30 30;
color: rgb(255,0,0);
}
mask: color {
bounds: 15 15 30 30;
color: rgb(255,255,255);
}
}
mask {
mode: inverted-alpha;
source: color {
bounds: 50 0 30 30;
color: rgb(0,255,0);
}
mask: color {
bounds: 65 15 30 30;
color: rgb(255,255,255);
}
}
mask {
mode: luminance;
source: color {
bounds: 0 50 30 30;
color: rgb(255,255,0);
}
mask: color {
bounds: 15 65 30 30;
color: rgb(255,255,255);
}
}
mask {
mode: inverted-luminance;
source: color {
bounds: 50 50 30 30;
color: rgb(0,0,255);
}
mask: color {
bounds: 65 65 30 30;
color: rgb(255,255,255);
}
}