diff --git a/demos/node-editor/node-format.md b/demos/node-editor/node-format.md index a70055c51e..448e188755 100644 --- a/demos/node-editor/node-format.md +++ b/demos/node-editor/node-format.md @@ -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 | `` | *see below* | always | +| path | `` | "" | always | +| 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 | `` | *see below* | always | +| path | `` | "" | always | +| line-width | `` | 0 | non-default | +| line-cap | `` | butt | always | +| line-join | `` | miter | always | +| miter-limit | `` | 4 | non-default | +| dash | `{+}|none` | none | non-default | +| dash-offset | `` | 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 | diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build index ace6e9d98b..dbb087224c 100644 --- a/testsuite/gsk/meson.build +++ b/testsuite/gsk/meson.build @@ -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', diff --git a/testsuite/gsk/nodeparser/fill2.node b/testsuite/gsk/nodeparser/fill2.node new file mode 100644 index 0000000000..4702c0fa79 --- /dev/null +++ b/testsuite/gsk/nodeparser/fill2.node @@ -0,0 +1,4 @@ +fill { + path: "M 0 0 O 10 10 20 20 5"; + fill-rule: even-odd; +} diff --git a/testsuite/gsk/nodeparser/fill2.ref.node b/testsuite/gsk/nodeparser/fill2.ref.node new file mode 100644 index 0000000000..467a06ede0 --- /dev/null +++ b/testsuite/gsk/nodeparser/fill2.ref.node @@ -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; +} diff --git a/testsuite/gsk/nodeparser/stroke2.node b/testsuite/gsk/nodeparser/stroke2.node new file mode 100644 index 0000000000..73fbea57cd --- /dev/null +++ b/testsuite/gsk/nodeparser/stroke2.node @@ -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; +} diff --git a/testsuite/gsk/nodeparser/stroke2.ref.node b/testsuite/gsk/nodeparser/stroke2.ref.node new file mode 100644 index 0000000000..1e2e93c795 --- /dev/null +++ b/testsuite/gsk/nodeparser/stroke2.ref.node @@ -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; +}