mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Merge branch 'path-node-tests' into 'main'
css: Replace border rendering code with GskPath See merge request GNOME/gtk!6341
This commit is contained in:
commit
a4df8d8818
@ -147,6 +147,19 @@ Creates a node like `gsk_cross_fade_node_new()` with the given properties.
|
||||
|
||||
Creates a node like `gsk_debug_node_new()` with the given properties.
|
||||
|
||||
### fill
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| --------- | --------------- | ---------------------- | ----------- |
|
||||
| child | `<node>` | *see below* | always |
|
||||
| path | `<string>` | "" | always |
|
||||
| fill-rule | `<fill-rule>` | winding | always |
|
||||
|
||||
Creates a node like `gsk_fill_node_new()` with the given properties.
|
||||
|
||||
The default child node is the default color node, but created with the
|
||||
bounds of the path.
|
||||
|
||||
### glshader
|
||||
|
||||
| property | syntax | default | printed |
|
||||
@ -289,6 +302,24 @@ Creates a node like `gsk_rounded_clip_node_new()` with the given properties.
|
||||
|
||||
Creates a node like `gsk_shadow_node_new()` with the given properties.
|
||||
|
||||
### stroke
|
||||
|
||||
| property | syntax | default | printed |
|
||||
| ----------- | ------------------ | ----------------- | ----------- |
|
||||
| child | `<node>` | *see below* | always |
|
||||
| path | `<string>` | "" | always |
|
||||
| line-width | `<number>` | 0 | non-default |
|
||||
| line-cap | `<line-cap>` | butt | always |
|
||||
| line-join | `<line-join>` | miter | always |
|
||||
| miter-limit | `<number>` | 4 | non-default |
|
||||
| dash | `<number>{+}|none` | none | non-default |
|
||||
| dash-offset | `<number>` | 0 | non-default |
|
||||
|
||||
Creates a node like `gsk_stroke_node_new()` with the given properties.
|
||||
|
||||
The default child node is the default color node, but created with the
|
||||
stroke bounds of the path.
|
||||
|
||||
### text
|
||||
|
||||
| property | syntax | default | printed |
|
||||
|
@ -295,6 +295,8 @@ node_parser_tests = [
|
||||
'empty-transform.ref.node',
|
||||
'fill.node',
|
||||
'fill.ref.node',
|
||||
'fill2.node',
|
||||
'fill2.ref.node',
|
||||
'glshader.node',
|
||||
'glshader.ref.node',
|
||||
'glshader.errors',
|
||||
|
4
testsuite/gsk/nodeparser/fill2.node
Normal file
4
testsuite/gsk/nodeparser/fill2.node
Normal file
@ -0,0 +1,4 @@
|
||||
fill {
|
||||
path: "M 0 0 O 10 10 20 20 5";
|
||||
fill-rule: even-odd;
|
||||
}
|
9
testsuite/gsk/nodeparser/fill2.ref.node
Normal file
9
testsuite/gsk/nodeparser/fill2.ref.node
Normal file
@ -0,0 +1,9 @@
|
||||
fill {
|
||||
child: color {
|
||||
bounds: 0 0 20 20;
|
||||
color: rgb(255,0,204);
|
||||
}
|
||||
path: "\
|
||||
M 0 0 O 10 10, 20 20, 5";
|
||||
fill-rule: even-odd;
|
||||
}
|
10
testsuite/gsk/nodeparser/stroke2.node
Normal file
10
testsuite/gsk/nodeparser/stroke2.node
Normal file
@ -0,0 +1,10 @@
|
||||
stroke {
|
||||
child: color { bounds: 0 0 100 100; color: red; }
|
||||
path: "M 10, 10 L 90, 90 M 90, 10 L 10, 90";
|
||||
line-width: 2.5;
|
||||
line-cap: butt;
|
||||
line-join: miter;
|
||||
miter-limit: 3.1;
|
||||
dash: 0 1 4.5 10;
|
||||
dash-offset: 2.1;
|
||||
}
|
17
testsuite/gsk/nodeparser/stroke2.ref.node
Normal file
17
testsuite/gsk/nodeparser/stroke2.ref.node
Normal file
@ -0,0 +1,17 @@
|
||||
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: 2.5;
|
||||
line-cap: butt;
|
||||
line-join: miter;
|
||||
miter-limit: 3.1;
|
||||
dash: 0 1 4.5 10;
|
||||
dash-offset: 2.1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user