[PATCH] description of animator.py
Kandarp Kaushik
kandarp at seeta.in
Thu Aug 12 13:47:31 EDT 2010
---
animator1.py | 69 ++++++++++++++++++++++++++++++---------------------------
1 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/animator1.py b/animator1.py
index 908e2cf..473d817 100644
--- a/animator1.py
+++ b/animator1.py
@@ -28,7 +28,9 @@ EASE_IN_EXPO = 1
class Animator(gobject.GObject):
-
+ """
+ :Inherits: gobject.GObject
+ """
__gsignals__ = {
'completed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
@@ -45,22 +47,21 @@ class Animator(gobject.GObject):
def add(self, animation):
"""
Parameter
- ---------
- animation :
+ - animation:
+ Returns
+ - None
+ Description: Adds animation type
"""
self._animations.append(animation)
def remove_all(self):
"""
- Parameters
- ----------
- None :
-
+ Parameters
+ - None
Returns
- -------
- None :
-
+ - None
+ Description: Stops animation, removes animation type
"""
self.stop()
self._animations = []
@@ -68,13 +69,10 @@ class Animator(gobject.GObject):
def start(self):
"""
Parameters
- ----------
- None :
-
+ - None
Returns
- -------
- None
-
+ - None
+ Description: Records starting time, sets timeout_sid
"""
if self._timeout_sid:
self.stop()
@@ -86,13 +84,10 @@ class Animator(gobject.GObject):
def stop(self):
"""
Parameters
- ----------
- None :
-
+ - None
Returns
- -------
- None :
-
+ - None
+ Description: Resets timeout_sid
"""
if self._timeout_sid:
gobject.source_remove(self._timeout_sid)
@@ -113,24 +108,25 @@ class Animator(gobject.GObject):
return True
-class Animation(object):
+class Animation(object):
+ """
+ :Inherits: object
+ """
def __init__(self, start, end):
+
self.start = start
self.end = end
def do_frame(self, t, duration, easing):
- """
+ """
Parameters
- -----------
- t:
- duration:
- easing:
-
- Returns
- --------
- None:
-
+ - t:
+ - duration:
+ - easing:
+ Returns
+ - None
+ Description: Updates frame, ends after t=duration
"""
start = self.start
change = self.end - self.start
@@ -147,4 +143,11 @@ class Animation(object):
self.next_frame(frame)
def next_frame(self, frame):
+ """
+ Parameters
+ - frame:
+ Returns
+ - None
+ Description: pass, do nothing
+ """
pass
--
1.7.0.4
------=_20100814100236_27512--
More information about the Sugar-devel
mailing list