<s> import pyglet <EOL> class Camera ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , position = None , angle = None , zoom = None , relative = False ) : <EOL> self . position = position <EOL> self . angle = angle <EOL> self . zoom = zoom <EOL> self . relative = relative <EOL> def draw ( self , gl = pyglet . gl ) : <EOL> if not self . relative : <EOL> gl . glLoadIdentity ( ) <EOL> if self . position is not None : <EOL> px , py = self . position <EOL> gl . glTranslatef ( px , py , <NUM_LIT:0> ) <EOL> if self . angle is not None : <EOL> gl . glRotatef ( self . angle , <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) <EOL> if self . zoom is not None : <EOL> sx , sy = self . zoom <EOL> gl . glScalef ( sx , sy , <NUM_LIT:0> ) </s>
