From cb69d2e1c7ced951cbf7a31ee286b0ed92cab8a8 Mon Sep 17 00:00:00 2001 From: rcoh Date: Fri, 18 Feb 2011 16:56:43 -0500 Subject: Adding Epydoc generated docs. --- ...SmootLight.operationscore.PixelEvent-pysrc.html | 149 +++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 html/SmootLight.operationscore.PixelEvent-pysrc.html (limited to 'html/SmootLight.operationscore.PixelEvent-pysrc.html') diff --git a/html/SmootLight.operationscore.PixelEvent-pysrc.html b/html/SmootLight.operationscore.PixelEvent-pysrc.html new file mode 100644 index 0000000..6e8b9c0 --- /dev/null +++ b/html/SmootLight.operationscore.PixelEvent-pysrc.html @@ -0,0 +1,149 @@ + + + + + SmootLight.operationscore.PixelEvent + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package SmootLight :: + Package operationscore :: + Module PixelEvent + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module SmootLight.operationscore.PixelEvent

+
+ 1  """PixelEvent is a class defining a light response.  Inheriting classes should define state, 
+ 2  which should return a color, or None if the response is complete.  Consider 
+ 3  requiring a generate event.""" 
+ 4  from operationscore.SmootCoreObject import * 
+ 5  from pixelevents.StepEvent import * 
+ 6  import util.ColorOps as color 
+
7 -class PixelEvent(SmootCoreObject): +
8 - def init(self): +
9 self.validateArgs('PixelEvent.params') +10 self.initEvent() +
11 - def initEvent(self): +
12 pass +
13 #Returns a new PixelEvent, but with a response scaled by c. +
14 - def scale(self,c): +
15 if c == 1: +16 return self +17 newDict = dict(self.argDict) +18 newDict['Color'] = color.multiplyColor(newDict['Color'], c) +19 return self.__class__(newDict) +
20 - def state(self,timeDelay): +
21 pass +
22 @staticmethod +
23 - def addPixelEventIfMissing(responseDict): +
24 if not 'PixelEvent' in responseDict: +25 if 'Color' in responseDict: +26 color = responseDict['Color'] +27 else: +28 raise Exception('Need Color. Probably') +29 responseDict['PixelEvent'] = StepEvent.generate(300, color) +
30 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3