<s> '''<STR_LIT:U+0020>''' <EOL> __docformat__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' <EOL> import unittest <EOL> from pyglet . gl import * <EOL> from pyglet . ext import projection <EOL> from pyglet import window <EOL> import base_projection <EOL> class VIEWPORT_ORTHO ( unittest . TestCase ) : <EOL> def test_viewport_ortho ( self ) : <EOL> width , height = <NUM_LIT:200> , <NUM_LIT:200> <EOL> w = window . Window ( width , height ) <EOL> w . viewport = projection . WindowViewport ( w ) <EOL> w . projection = projection . OrthographicProjection ( w . viewport ) <EOL> self . views = views = [ <EOL> projection . OrthographicViewport ( w . projection , <EOL> <NUM_LIT:0> , <NUM_LIT:0> , width / <NUM_LIT:2> , height / <NUM_LIT:2> ) , <EOL> projection . OrthographicViewport ( w . projection , <EOL> width / <NUM_LIT:2> , <NUM_LIT:0> , width / <NUM_LIT:2> , height / <NUM_LIT:2> ) , <EOL> projection . OrthographicViewport ( w . projection , <EOL> width / <NUM_LIT:2> , height / <NUM_LIT:2> , width / <NUM_LIT:2> , height / <NUM_LIT:2> ) , <EOL> projection . OrthographicViewport ( w . projection , <EOL> <NUM_LIT:0> , height / <NUM_LIT:2> , width / <NUM_LIT:2> , height / <NUM_LIT:2> ) , <EOL> ] <EOL> projections = [ projection . OrthographicProjection ( v ) for v in views ] <EOL> colors = [ <EOL> ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ) , <EOL> ( <NUM_LIT:0> , <NUM_LIT:1> , <NUM_LIT:0> ) , <EOL> ( <NUM_LIT:0> , <NUM_LIT:0> , <NUM_LIT:1> ) , <EOL> ( <NUM_LIT:1> , <NUM_LIT:1> , <NUM_LIT:0> ) <EOL> ] <EOL> while not w . has_exit : <EOL> w . dispatch_events ( ) <EOL> for color , p in zip ( colors , projections ) : <EOL> p . apply ( ) <EOL> glColor3f ( * color ) <EOL> base_projection . fillrect ( <NUM_LIT:0> , <NUM_LIT:0> , width / <NUM_LIT:2> , width / <NUM_LIT:2> ) <EOL> w . flip ( ) <EOL> w . close ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
