Difficult-Rocket/tests/_test_image.py

19 lines
421 B
Python
Raw Normal View History

2021-02-22 21:32:13 +08:00
import pyglet
window = pyglet.window.Window(width=1000, height=1000)
# a_image = pyglet.image.load('textures/Runtime.png')
pyglet.resource.path = ['../textures']
pyglet.resource.reindex()
b_image = pyglet.resource.image('Runtime.png')
c_image = pyglet.resource.image('Editor/TrashCan.png')
@window.event
def on_draw():
window.clear()
b_image.blit(x=500, y=10)
c_image.blit(x=500, y=600)
pyglet.app.run()