From 48dc7df5b71cc555f507bb79a7a7d3222c931d58 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 15 Jan 2024 07:45:16 -0500 Subject: [PATCH] Update the node format docs Mention the new syntax for naming and reusing textures. --- demos/node-editor/node-format.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/demos/node-editor/node-format.md b/demos/node-editor/node-format.md index 448e188755..90ad8ae142 100644 --- a/demos/node-editor/node-format.md +++ b/demos/node-editor/node-format.md @@ -336,13 +336,17 @@ font, an error node will be returned. ### texture -| property | syntax | default | printed | -| -------- | ---------------- | ---------------------- | ----------- | -| bounds | `` | 50 | always | -| texture | `` | *see below* | always | +| property | syntax | default | printed | +| -------- | ------------------- | ---------------------- | ----------- | +| bounds | `` | 50 | always | +| texture | ``?``? | *see below* | always | Creates a node like `gsk_texture_node_new()` with the given properties. +If a string is specified for the texture, it will be used as a name for the text. +Textures can be reused by specifying the name of a previously used texture. In +that case, the url can be omitted. + The default texture is a 10x10 checkerboard with the top left and bottom right 5x5 being in the color #FF00CC and the other part being transparent. A possible representation for this texture is `url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAAKUlEQVQYlWP8z3DmPwMaYGQwYUQXY0IXwAUGUCGGoxkYGBiweXAoeAYAz44F3e3U1xUAAAAASUVORK5CYII=")