aboutsummaryrefslogtreecommitdiff
path: root/renderers
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-13 03:57:56 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-13 03:57:56 -0500
commitf6dd5ab92949843d2fb163e2d84f19e824a291dc (patch)
treeea305104129abd1d4f8233590e2a41070d2f3cfb /renderers
parentdb19c9731c7bed3716a387a0db5b56dd3ba72104 (diff)
Added OSC (phone controlled) behavior to the C5 Sign
Diffstat (limited to 'renderers')
-rw-r--r--renderers/PygameRenderer.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/renderers/PygameRenderer.py b/renderers/PygameRenderer.py
index bc50360..01e2615 100644
--- a/renderers/PygameRenderer.py
+++ b/renderers/PygameRenderer.py
@@ -18,8 +18,13 @@ class PygameRenderer(Renderer):
def render(self, lightSystem, currentTime=timeops.time()):
self.background.fill(Color(0,0,0))
#print 'drawing color:',light.color
+ if 'Scale' in self:
+ scale = self['Scale']
+ else:
+ scale = 1
for light in lightSystem:
- pygame.draw.circle(self.background, light.state(currentTime), light.location, \
+ scaledLoc = [l*scale for l in light.location]
+ pygame.draw.circle(self.background, light.state(currentTime), scaledLoc, \
light.radius)
self.screen.blit(self.background, (0,0))