diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-24 18:55:28 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-24 18:55:28 +0200 |
commit | f4a1c391fe1ff8bad6971bfb7e8a9dba3c504bbf (patch) | |
tree | 2d79006e275f26343d173404102e1899ccc2ec48 | |
parent | 9f1ce63296c5c43b9c5343f1779e8c2203843205 (diff) | |
parent | d04d58d3872bedcf5a899bd17db316a52732dce0 (diff) | |
download | redot-engine-f4a1c391fe1ff8bad6971bfb7e8a9dba3c504bbf.tar.gz |
Merge pull request #91110 from KoBeWi/impostor_node_among_us
Clarify transform inheritance of CanvasItem nodes
-rw-r--r-- | doc/classes/CanvasItem.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 1cfd44467f..18413c4be5 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -8,6 +8,7 @@ Any [CanvasItem] can draw. For this, [method queue_redraw] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal. Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis. A [CanvasItem] can be hidden, which will also hide its children. By adjusting various other properties of a [CanvasItem], you can also modulate its color (via [member modulate] or [member self_modulate]), change its Z-index, blend mode, and more. + Note that properties like transform, modulation, and visibility are only propagated to [i]direct[/i] [CanvasItem] child nodes. If there is a non-[CanvasItem] node in between, like [Node] or [AnimationPlayer], the [CanvasItem] nodes below will have an independent position and [member modulate] chain. See also [member top_level]. </description> <tutorials> <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link> |