snippets/ev3/screen_basics: finish show_image todo

ev3.screen.show_image is implemented now
This commit is contained in:
David Lechner
2020-01-13 18:50:22 -06:00
parent 05b69c1684
commit 37ca78217f
+1 -9
View File
@@ -42,16 +42,8 @@ wait(5000)
# IMAGES ######################################################################
# TODO: this needs to be implemented in the Image class
def show_image(img):
ev3.screen.clear()
x = (ev3.screen.width - img.width) // 2
y = (ev3.screen.height - img.height) // 2
ev3.screen.draw_image(x, y, img)
# Show an image
show_image(ev3_img)
ev3.screen.show_image(ev3_img)
# Wait some time too look at image
wait(5000)