summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-06-17 18:15:11 +0200
committerGitHub <noreply@github.com>2021-06-17 18:15:11 +0200
commit13c4796693c3c32993cd49b226fc9c78ad376f6d (patch)
treeb7aa900f5ba2f65586f5f6451e6b288041dc3ff8 /doc/classes
parent17ded9a152f41d3e9ef7aa567065fe13f8e0e33d (diff)
parent94d31ac327a8fe6ff7c007b34cb25772bf96d17e (diff)
downloadredot-engine-13c4796693c3c32993cd49b226fc9c78ad376f6d.tar.gz
Merge pull request #49685 from reduz/implement-drawing-animation-slices-in-canvas
Implement animation slice drawing in CanvasItem
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/CanvasItem.xml22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 87b157db4e..f15bc14be3 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>
@@ -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>