Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyglet
- from gym.envs.classic_control import rendering
- screen_width = 600
- screen_height = 400
- table_radius = 200
- viewer = rendering.Viewer(screen_width, screen_height + 20)
- table = rendering.make_circle(radius=table_radius, filled=False)
- table_trans = rendering.Transform()
- table.add_attr(table_trans)
- table_trans.set_translation(screen_width / 2, screen_height / 2)
- viewer.add_geom(table)
- text = 'This is a test but it is not visible'
- label = pyglet.text.Label(text, font_size=36,
- x=10, y=10, anchor_x='left', anchor_y='bottom',
- color=(255, 123, 255, 255))
- label.draw()
- viewer.render(return_rgb_array=False)
- input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement