#NEWLINE# def preparePixmap( self ) : #NEWLINE# #INDENT# ' Prepare the pixmap(s) for the transition.\n\n        This method draws the starting pixmap into the output pixmap.\n        The transition update then draws over the output with the\n        proper portion of the ending pixmap.\n\n        ' #NEWLINE# start = self . startPixmap ( ) #NEWLINE# end = self . endPixmap ( ) #NEWLINE# size = start . size ( ) . expandedTo ( end . size ( ) ) #NEWLINE# width = size . width ( ) #NEWLINE# height = size . height ( ) #NEWLINE# painter = QPainter ( self . outPixmap ( ) ) #NEWLINE# painter . drawPixmap ( 0 , 0 , start ) #NEWLINE# direction = self . direction ( ) #NEWLINE# if ( direction == self . LeftToRight ) : #NEWLINE# #INDENT# start_rect = QRect ( 0 , 0 , 0 , height ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( direction == self . RightToLeft ) : #NEWLINE# #INDENT# start_rect = QRect ( width , 0 , 0 , height ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( direction == self . TopToBottom ) : #NEWLINE# #INDENT# start_rect = QRect ( 0 , 0 , width , 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( direction == start_rect . BottomToTop ) : #NEWLINE# #INDENT# start_rect = QRect ( 0 , height , width , 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( 'Invalid direction: %s' % direction ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# end_rect = QRect ( 0 , 0 , width , height ) #NEWLINE# return ( start_rect , end_rect )