aboutsummaryrefslogtreecommitdiff
path: root/renderers
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-16 18:29:41 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-16 18:29:41 -0500
commitfffc14c4672294d9bbf8c60edfe8c309f0d54698 (patch)
tree19057b2e98735cc30fa1e0b3932d416946f8d705 /renderers
parent24aa31808de6a4dc06a651076e5b292aebd9240d (diff)
parent2df9e408a0ff74539862c4a4e562a878cc11a329 (diff)
Merge branch 'conner5' of https://github.com/dxiao/SmootLight into dxiao-conner5
Conflicts: config/C5Sign.xml layouts/SpecifiedLayout.py
Diffstat (limited to 'renderers')
-rw-r--r--renderers/PygameRenderer.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/renderers/PygameRenderer.py b/renderers/PygameRenderer.py
index bc50360..8be272c 100644
--- a/renderers/PygameRenderer.py
+++ b/renderers/PygameRenderer.py
@@ -18,9 +18,14 @@ 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, \
- light.radius)
+ scaledLoc = [l*scale for l in light.location]
+ pygame.draw.circle(self.background, light.state(currentTime), scaledLoc, \
+ 5)
self.screen.blit(self.background, (0,0))
pygame.display.flip()