Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/graphics/animator.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sugar/graphics/animator.py')
-rw-r--r--src/sugar/graphics/animator.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/sugar/graphics/animator.py b/src/sugar/graphics/animator.py
index 85b9852..347b1d8 100644
--- a/src/sugar/graphics/animator.py
+++ b/src/sugar/graphics/animator.py
@@ -38,13 +38,39 @@ class Animator(gobject.GObject):
self._start_time = None
def add(self, animation):
+ """
+ Parameter
+ ---------
+ animation :
+
+ """
self._animations.append(animation)
def remove_all(self):
+ """
+ Parameters
+ ----------
+ None :
+
+ Returns
+ -------
+ None :
+
+ """
self.stop()
self._animations = []
def start(self):
+ """
+ Parameters
+ ----------
+ None :
+
+ Returns
+ -------
+ None
+
+ """
if self._timeout_sid:
self.stop()
@@ -53,6 +79,16 @@ class Animator(gobject.GObject):
int(self._interval * 1000), self._next_frame_cb)
def stop(self):
+ """
+ Parameters
+ ----------
+ None :
+
+ Returns
+ -------
+ None :
+
+ """
if self._timeout_sid:
gobject.source_remove(self._timeout_sid)
self._timeout_sid = 0
@@ -77,6 +113,19 @@ class Animation(object):
self.end = end
def do_frame(self, t, duration, easing):
+ """
+ Parameters
+ ----------
+ t:
+
+ duration:
+
+ easing:
+
+ Returns
+ None:
+
+ """
start = self.start
change = self.end - self.start