tests: Add more tests for texture scale nodes

This commit is contained in:
Matthias Clasen
2023-03-13 18:20:02 +01:00
parent c035384fc8
commit ad84ee8352
5 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
clip {
clip: 24995 24995 10 10;
child: transform {
transform: translate(25000, 25000) rotate(90) translate(-25000, -25000);
child: texture-scale {
texture: url("data:;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAKElEQVQYlWNkYGD4z4AG/v/HEGJgwhDBAQZQIQs2hzMyMtLBauorBACQUgcSISWLRgAAAABJRU5ErkJggg==");
bounds: 0 0 50000 50000;
filter: nearest;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 B

View File

@@ -77,6 +77,7 @@ compare_render_tests = [
'scaled-texture',
'shadow-in-opacity',
'texture-scale-magnify-10000x',
'texture-scale-magnify-rotate',
'texture-scale-stripes',
'texture-url',
'transform-in-transform',
@@ -234,6 +235,8 @@ node_parser_tests = [
'texture-fail.node',
'texture-fail.ref.node',
'texture-fail.ref.errors',
'texture-scale-filters.node',
'texture-scale-filters.ref.node',
'texture-scale-unknown-filter.errors',
'texture-scale-unknown-filter.node',
'texture-scale-unknown-filter.ref.node',

View File

@@ -0,0 +1,22 @@
texture-scale {
texture: url('data:,<svg><rect width="10" height="10" style="fill:red"/></svg>');
bounds: 0 0 50 50;
}
texture-scale {
texture: url('data:,<svg><rect width="10" height="10" style="fill:red"/></svg>');
bounds: 0 0 50 50;
filter: linear;
}
texture-scale {
texture: url('data:,<svg><rect width="10" height="10" style="fill:red"/></svg>');
bounds: 0 0 50 50;
filter: nearest;
}
texture-scale {
texture: url('data:,<svg><rect width="10" height="10" style="fill:red"/></svg>');
bounds: 0 0 50 50;
filter: trilinear;
}

View File

@@ -0,0 +1,26 @@
texture-scale {
bounds: 0 0 50 50;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
");
}
texture-scale {
bounds: 0 0 50 50;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
");
}
texture-scale {
bounds: 0 0 50 50;
filter: nearest;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
");
}
texture-scale {
bounds: 0 0 50 50;
filter: trilinear;
texture: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGElEQVQYlWP8z8Dwn4EIwESMolGF\
1FMIAD2cAhL1w47oAAAAAElFTkSuQmCC\
");
}