Add a nodeparser tests for fill and stroke nodes

This commit is contained in:
Matthias Clasen
2021-12-04 12:46:39 -05:00
parent a4374f41db
commit d773a36623
9 changed files with 81 additions and 0 deletions

View File

@@ -160,6 +160,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',
@@ -174,6 +176,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',

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,9 @@
fill {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "M 150 100 A 50 50 0 0 0 50 100 A 50 50 0 0 0 150 100 z";
fill-rule: even-odd;
}

View File

@@ -0,0 +1,9 @@
fill {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "\
M 150 100 A 50 50 0 0 0 50 100 A 50 50 0 0 0 150 100 z";
fill-rule: even-odd;
}

View File

@@ -0,0 +1,13 @@
stroke {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "M 111 222 h 333 v 444 h -333 z";
line-width: 2.5;
line-cap: round;
line-join: miter-clip;
miter-limit: 5.0;
dash: 1 2 3 4 5;
dash-offset: 1.5;
}

View File

@@ -0,0 +1,14 @@
stroke {
child: color {
bounds: 0 0 50 50;
color: rgb(255,0,204);
}
path: "\
M 111 222 h 333 v 444 h -333 z";
line-width: 2.5;
line-cap: round;
line-join: miter-clip;
miter-limit: 5;
dash: 1 2 3 4 5;
dash-offset: 1.5;
}