def shift_in_from_top(image): """ Creates an animation where "image" is shifted from top of the display down in to the center of the display. """ for i in reversed(range(DISPLAY_WIDTH + 1)): yield Image.shift_up(image, i)
def shift_out_to_top(image): """ Creates an animation where "image" is shifted from center of display out of the screen upwards. """ for i in range(DISPLAY_WIDTH + 1): yield Image.shift_up(image, i)