#NEWLINE# def __init__( self , slide , machine , image , width = None , height = None , x = None , y = None , h_pos = None , v_pos = None , layer = 0 , **kwargs ) : #NEWLINE# #INDENT# super ( ImageDisplayElement , self ) . __init__ ( slide , x , y , h_pos , v_pos , layer ) #NEWLINE# self . loadable_asset = True #NEWLINE# self . machine = machine #NEWLINE# image = image . lower ( ) #NEWLINE# if ( image not in machine . images ) : #NEWLINE# #INDENT# raise Exception ( ( ( 'Received a request to add an image, but the name ' + image ) + " doesn't exist in in the list of registered images." ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . image = machine . images [ image ] #NEWLINE# #UNINDENT# self . layer = layer #NEWLINE# if self . image . loaded : #NEWLINE# #INDENT# self . _asset_loaded ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . ready = False #NEWLINE# self . image . load ( callback = self . _asset_loaded )