#NEWLINE# def move_to_clamp( self , other ) : #NEWLINE# #INDENT# '\n        Moves this rect so it is completely covered by the rect in "other" and\n        returns a new Rect instance.\n        ' #NEWLINE# other = Rect ( * other ) #NEWLINE# clone = self . clone ( ) #NEWLINE# if ( clone . left < other . left ) : #NEWLINE# #INDENT# clone . right -= ( clone . left - other . left ) #NEWLINE# clone . left = other . left #NEWLINE# #UNINDENT# if ( clone . top < other . top ) : #NEWLINE# #INDENT# clone . bottom -= ( clone . top - other . top ) #NEWLINE# clone . top = other . top #NEWLINE# #UNINDENT# if ( clone . right > self . right ) : #NEWLINE# #INDENT# clone . left -= ( clone . right - other . right ) #NEWLINE# clone . right = other . right #NEWLINE# #UNINDENT# if ( clone . bottom > other . bottom ) : #NEWLINE# #INDENT# clone . top -= ( clone . bottom - other . bottom ) #NEWLINE# clone . bottom = other . bottom #NEWLINE# #UNINDENT# return clone