summaryrefslogtreecommitdiff
path: root/doc/classes/CanvasItem.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/CanvasItem.xml')
-rw-r--r--doc/classes/CanvasItem.xml54
1 files changed, 38 insertions, 16 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 87b157db4e..d0950ae741 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -24,6 +24,21 @@
Overridable function called by the engine (if defined) to draw the canvas item.
</description>
</method>
+ <method name="draw_animation_slice">
+ <return type="void">
+ </return>
+ <argument index="0" name="animation_length" type="float">
+ </argument>
+ <argument index="1" name="slice_begin" type="float">
+ </argument>
+ <argument index="2" name="slice_end" type="float">
+ </argument>
+ <argument index="3" name="offset" type="float" default="0.0">
+ </argument>
+ <description>
+ Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly.
+ </description>
+ </method>
<method name="draw_arc">
<return type="void">
</return>
@@ -60,11 +75,11 @@
</argument>
<argument index="4" name="size" type="int" default="-1">
</argument>
- <argument index="5" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="6" name="outline_size" type="int" default="0">
</argument>
- <argument index="7" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<description>
Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.
@@ -90,7 +105,7 @@
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -98,6 +113,13 @@
Draws a colored polygon of any amount of points, convex or concave.
</description>
</method>
+ <method name="draw_end_animation">
+ <return type="void">
+ </return>
+ <description>
+ After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required.
+ </description>
+ </method>
<method name="draw_line">
<return type="void">
</return>
@@ -120,9 +142,9 @@
</argument>
<argument index="1" name="texture" type="Texture2D">
</argument>
- <argument index="2" name="transform" type="Transform2D" default="Transform2D( 1, 0, 0, 1, 0, 0 )">
+ <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" 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.
@@ -171,11 +193,11 @@
</argument>
<argument index="6" name="size" type="int" default="-1">
</argument>
- <argument index="7" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="8" name="outline_size" type="int" default="0">
</argument>
- <argument index="9" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<argument index="10" name="flags" type="int" default="51">
</argument>
@@ -201,7 +223,7 @@
</argument>
<argument index="1" name="colors" type="PackedColorArray">
</argument>
- <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )">
+ <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()">
</argument>
<argument index="3" name="texture" type="Texture2D" default="null">
</argument>
@@ -279,7 +301,7 @@
</argument>
<argument index="1" name="rotation" type="float" default="0.0">
</argument>
- <argument index="2" name="scale" type="Vector2" default="Vector2( 1, 1 )">
+ <argument index="2" name="scale" type="Vector2" default="Vector2(1, 1)">
</argument>
<description>
Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this.
@@ -309,11 +331,11 @@
</argument>
<argument index="5" name="size" type="int" default="-1">
</argument>
- <argument index="6" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="7" name="outline_size" type="int" default="0">
</argument>
- <argument index="8" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 0 )">
+ <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)">
</argument>
<argument index="9" name="flags" type="int" default="3">
</argument>
@@ -359,7 +381,7 @@
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
- <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<description>
Draws a texture at a given position.
@@ -374,7 +396,7 @@
</argument>
<argument index="2" name="tile" type="bool">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
@@ -391,7 +413,7 @@
</argument>
<argument index="2" name="src_rect" type="Rect2">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
+ <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)">
</argument>
<argument index="4" name="transpose" type="bool" default="false">
</argument>
@@ -573,10 +595,10 @@
<member name="material" type="Material" setter="set_material" getter="get_material">
The material applied to textures on this [CanvasItem].
</member>
- <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
The color applied to textures on this [CanvasItem].
</member>
- <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color( 1, 1, 1, 1 )">
+ <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color(1, 1, 1, 1)">
The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s.
</member>
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">