aboutsummaryrefslogtreecommitdiff
path: root/renderers/PygameRenderer.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2011-02-01 23:14:12 -0500
committerGravatar rcoh <rcoh@mit.edu>2011-02-01 23:14:12 -0500
commit5a97e7548b0ec44f0d61a724903748197e69df7c (patch)
tree7bb6b8ea7e488949eeb16ae18b0ad2230f1f7c9b /renderers/PygameRenderer.py
parent082e4b0c53123dd377da148541f7d98516716862 (diff)
parent482a94fd48627153b923931d6ff21ebf57fad6f7 (diff)
Merge branch 'osc' of github.com:rcoh/SmootLight into osc
Diffstat (limited to 'renderers/PygameRenderer.py')
-rw-r--r--renderers/PygameRenderer.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/renderers/PygameRenderer.py b/renderers/PygameRenderer.py
index 9582a03..bc50360 100644
--- a/renderers/PygameRenderer.py
+++ b/renderers/PygameRenderer.py
@@ -4,16 +4,19 @@ import pygame
from pygame.locals import *
import pdb
class PygameRenderer(Renderer):
+ """PygameRenderer is a renderer which renders the LightSystem to a pygame display"""
+
def initRenderer(self):
pygame.init()
self.screen = pygame.display.set_mode((1300,500))
self.background = pygame.Surface(self.screen.get_size())
self.background = self.background.convert()
- self.background.fill(Color('Black'))
+ self.background.fill(Color(0,0,0))
self.stopwatch = timeops.Stopwatch()
self.stopwatch.start()
+
def render(self, lightSystem, currentTime=timeops.time()):
- self.background.fill(Color('Black'))
+ self.background.fill(Color(0,0,0))
#print 'drawing color:',light.color
for light in lightSystem:
pygame.draw.circle(self.background, light.state(currentTime), light.location, \