add simple usage example to window.py

old-commit-hash: c4592e854767e635e4e1f6a75e74f1453043c8c4
This commit is contained in:
George Hotz
2020-04-30 15:31:01 -07:00
parent 3314b9ee47
commit 1a5a6640d5
+10
View File
@@ -38,3 +38,13 @@ class Window():
if event.type == pygame.MOUSEBUTTONDOWN:
mx, my = pygame.mouse.get_pos()
return mx, my
if __name__ == "__main__":
import numpy as np
win = Window(200, 200)
img = np.zeros((200,200,3), np.uint8)
while 1:
print("draw")
img += 1
win.draw(img)