Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyglet
- from pyglet.window import *
- window = pyglet.window.Window()
- label = pyglet.text.Label('Hello, world',
- font_name='Times New Roman',
- font_size=36,
- x=window.width//2, y=window.height//2,
- anchor_x='center', anchor_y='center')
- @window.event
- def on_draw():
- window.clear()
- label.draw()
- imageData = pyglet.image.ImageData(3, 3, 'RGB', [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0 ])
- imageData.blit(10, 10)
- pyglet.app.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement