summaryrefslogtreecommitdiff
path: root/doc/classes/CanvasItem.xml
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-01-23 11:14:14 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-01-23 12:37:33 +0100
commitba177ccaecb91c3800e220272864dfb5c23958e7 (patch)
tree8eadc7fb7365c2863fa2536f6a6db68d82588ec6 /doc/classes/CanvasItem.xml
parent46820527dea1fb238edbc1137f3173750e053ece (diff)
doc: Misc updates for AnimationNode* and others
- Add some missing descriptions. - Add links to tutorials for ARVR and AnimationTree. - Style fixes. - Engine changes: * Make `AnimationNodeTransition.input_<number>` properties internal so that they don't appear in the docs. They still appear in the inspector based on the actual number of inputs requested. * Drop unimplemented `CPUParticles.flatness`. It's only used for 3D particles in `ParticlesMaterial`, and thus only relevant for `CPUParticles3D`.
Diffstat (limited to 'doc/classes/CanvasItem.xml')
-rw-r--r--doc/classes/CanvasItem.xml48
1 files changed, 25 insertions, 23 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 54d917c931..5475296c74 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -4,10 +4,10 @@
Base class of anything 2D.
</brief_description>
<description>
- Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. CanvasItem is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine.
- Any CanvasItem can draw. For this, [method update] must be called, then [constant NOTIFICATION_DRAW] will be received on idle time to request 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 the [method Object._notification], signal or [method _draw] virtual functions.
- Canvas items are drawn in tree order. 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 also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
+ Base class of anything 2D. Canvas items are laid out in a tree; children inherit and extend their parent's transform. [CanvasItem] is extended by [Control] for anything GUI-related, and by [Node2D] for anything related to the 2D engine.
+ Any [CanvasItem] can draw. For this, [method update] must be called, then [constant NOTIFICATION_DRAW] will be received on idle time to request 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 the [method Object._notification], signal or [method _draw] virtual functions.
+ Canvas items are drawn in tree order. 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 also be hidden, which will also hide its children. It provides many ways to change parameters such as modulation (for itself and its children) and self modulation (only for itself), as well as its blend mode.
Ultimately, a transform notification can be requested, which will notify the node that its global position changed in case the parent tree changed.
</description>
<tutorials>
@@ -19,7 +19,7 @@
<return type="void">
</return>
<description>
- Called (if exists) to draw the canvas item.
+ Overridable function called by the engine (if defined) to draw the canvas item.
</description>
</method>
<method name="draw_arc">
@@ -125,6 +125,7 @@
<argument index="4" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<description>
+ Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_multiline">
@@ -167,6 +168,7 @@
<argument index="2" name="normal_map" type="Texture" default="null">
</argument>
<description>
+ Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation.
</description>
</method>
<method name="draw_polygon">
@@ -385,70 +387,70 @@
<return type="Transform2D">
</return>
<description>
- Gets the transform matrix of this item's canvas.
+ Returns the transform matrix of this item's canvas.
</description>
</method>
<method name="get_global_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Gets the global position of the mouse.
+ Returns the global position of the mouse.
</description>
</method>
<method name="get_global_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the global transform matrix of this item.
+ Returns the global transform matrix of this item.
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the global transform matrix of this item in relation to the canvas.
+ Returns the global transform matrix of this item in relation to the canvas.
</description>
</method>
<method name="get_local_mouse_position" qualifiers="const">
<return type="Vector2">
</return>
<description>
- Gets the mouse position relative to this item's position.
+ Returns the mouse position relative to this item's position.
</description>
</method>
<method name="get_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets the transform matrix of this item.
+ Returns the transform matrix of this item.
</description>
</method>
<method name="get_viewport_rect" qualifiers="const">
<return type="Rect2">
</return>
<description>
- Gets the viewport's boundaries as a [Rect2].
+ Returns the viewport's boundaries as a [Rect2].
</description>
</method>
<method name="get_viewport_transform" qualifiers="const">
<return type="Transform2D">
</return>
<description>
- Gets this item's transform in relation to the viewport.
+ Returns this item's transform in relation to the viewport.
</description>
</method>
<method name="get_world_2d" qualifiers="const">
<return type="World2D">
</return>
<description>
- Gets the [World2D] where this item is in.
+ Returns the [World2D] where this item is in.
</description>
</method>
<method name="hide">
<return type="void">
</return>
<description>
- Hide the CanvasItem if it's currently visible.
+ Hide the [CanvasItem] if it's currently visible.
</description>
</method>
<method name="is_local_transform_notification_enabled" qualifiers="const">
@@ -528,14 +530,14 @@
<return type="void">
</return>
<description>
- Show the CanvasItem if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
+ Show the [CanvasItem] if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</description>
</method>
<method name="update">
<return type="void">
</return>
<description>
- Queue the CanvasItem for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw.
+ Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw.
</description>
</method>
</methods>
@@ -568,7 +570,7 @@
<signals>
<signal name="draw">
<description>
- Emitted when the CanvasItem must redraw. This can only be connected realtime, as deferred will not allow drawing.
+ Emitted when the [CanvasItem] must redraw. This can only be connected realtime, as deferred will not allow drawing.
</description>
</signal>
<signal name="hide">
@@ -607,19 +609,19 @@
Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied.
</constant>
<constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000">
- The CanvasItem's transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform].
+ The [CanvasItem]'s transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform].
</constant>
<constant name="NOTIFICATION_DRAW" value="30">
- The CanvasItem is requested to draw.
+ The [CanvasItem] is requested to draw.
</constant>
<constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
- The CanvasItem's visibility has changed.
+ The [CanvasItem]'s visibility has changed.
</constant>
<constant name="NOTIFICATION_ENTER_CANVAS" value="32">
- The CanvasItem has entered the canvas.
+ The [CanvasItem] has entered the canvas.
</constant>
<constant name="NOTIFICATION_EXIT_CANVAS" value="33">
- The CanvasItem has exited the canvas.
+ The [CanvasItem] has exited the canvas.
</constant>
</constants>
</class>