Add nodeparser tests for fill and stroke nodes

This commit is contained in:
Matthias Clasen 2023-08-07 00:03:17 -04:00
parent fc3c2e0942
commit a548a91e6d
9 changed files with 76 additions and 0 deletions

View File

@ -270,6 +270,8 @@ node_parser_tests = [
'empty-cross-fade.ref.node',
'empty-debug.node',
'empty-debug.ref.node',
'empty-fill.node',
'empty-fill.ref.node',
'empty-inset-shadow.node',
'empty-inset-shadow.ref.node',
'empty-linear-gradient.node',
@ -286,6 +288,8 @@ node_parser_tests = [
'empty-rounded-clip.ref.node',
'empty-shadow.node',
'empty-shadow.ref.node',
'empty-stroke.node',
'empty-stroke.ref.node',
'empty-text.node',
'empty-text.ref.node',
'empty-texture.node',
@ -294,6 +298,8 @@ node_parser_tests = [
'empty-texture-scale.ref.node',
'empty-transform.node',
'empty-transform.ref.node',
'fill.node',
'fill.ref.node',
'glshader.node',
'glshader.ref.node',
'glshader.errors',
@ -320,6 +326,8 @@ node_parser_tests = [
'string-error.errors',
'string-error.node',
'string-error.ref.node',
'stroke.node',
'stroke.ref.node',
'testswitch.node',
'text-fail.node',
'text-fail.ref.node',

View File

@ -0,0 +1 @@
fill { }

View File

@ -0,0 +1,14 @@
fill {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "\
M 25 0\
L 39.694629669189453 45.225425720214844\
L 1.2235870361328125 17.274574279785156\
L 48.776412963867188 17.274574279785156\
L 10.305368423461914 45.225425720214844\
Z";
fill-rule: winding;
}

View File

@ -0,0 +1 @@
stroke { }

View File

@ -0,0 +1,16 @@
stroke {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "\
M 25 0\
L 39.694629669189453 45.225425720214844\
L 1.2235870361328125 17.274574279785156\
L 48.776412963867188 17.274574279785156\
L 10.305368423461914 45.225425720214844\
Z";
line-width: 1;
line-cap: butt;
line-join: miter;
}

View File

@ -0,0 +1,4 @@
fill {
path: "M0,0L50,0C50,50 0,50 0,0Z";
fill-rule: winding;
}

View File

@ -0,0 +1,12 @@
fill {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "\
M 0 0\
L 50 0\
C 50 50, 0 50, 0 0\
Z";
fill-rule: winding;
}

View File

@ -0,0 +1,6 @@
stroke {
child: color { bounds: 0 0 100 100; color: red; }
path: "M10,10L90,90M90,10L10,90";
line-width: 10;
line-cap: round;
}

View File

@ -0,0 +1,14 @@
stroke {
child: color {
bounds: 0 0 100 100;
color: rgb(255,0,0);
}
path: "\
M 10 10\
L 90 90\
M 90 10\
L 10 90";
line-width: 10;
line-cap: round;
line-join: miter;
}