#NEWLINE# def _resizeBorderTest( self , pos ) : #NEWLINE# #INDENT# ' Hit test the frame for resizing.\n\n        Parameters\n        ----------\n        pos : QPoint\n            The point of interest, expressed in local coordinates.\n\n        Returns\n        -------\n        result : tuple\n            A 2-tuple of (int, QPoint) representing the resize border\n            and offset for the border.\n\n        ' #NEWLINE# rect = self . rect ( ) #NEWLINE# if ( not rect . contains ( pos ) ) : #NEWLINE# #INDENT# return ( self . NoBorder , QPoint ( ) ) #NEWLINE# #UNINDENT# x = pos . x ( ) #NEWLINE# y = pos . y ( ) #NEWLINE# width = rect . width ( ) #NEWLINE# height = rect . height ( ) #NEWLINE# margins = self . resizeMargins ( ) #NEWLINE# extra = self . ResizeCornerExtra #NEWLINE# if ( x < margins . left ( ) ) : #NEWLINE# #INDENT# if ( y < ( margins . top ( ) + extra ) ) : #NEWLINE# #INDENT# mode = self . NorthWestBorder #NEWLINE# offset = QPoint ( x , y ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( y > ( height - ( margins . bottom ( ) + extra ) ) ) : #NEWLINE# #INDENT# mode = self . SouthWestBorder #NEWLINE# offset = QPoint ( x , ( height - y ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# mode = self . WestBorder #NEWLINE# offset = QPoint ( x , 0 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( y < margins . top ( ) ) : #NEWLINE# #INDENT# if ( x < ( margins . left ( ) + extra ) ) : #NEWLINE# #INDENT# mode = self . NorthWestBorder #NEWLINE# offset = QPoint ( x , y ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( x > ( width - ( margins . right ( ) + extra ) ) ) : #NEWLINE# #INDENT# mode = self . NorthEastBorder #NEWLINE# offset = QPoint ( ( width - x ) , y ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# mode = self . NorthBorder #NEWLINE# offset = QPoint ( 0 , y ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( x > ( width - margins . right ( ) ) ) : #NEWLINE# #INDENT# if ( y < ( margins . top ( ) + extra ) ) : #NEWLINE# #INDENT# mode = self . NorthEastBorder #NEWLINE# offset = QPoint ( ( width - x ) , y ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( y > ( height - ( margins . bottom ( ) + extra ) ) ) : #NEWLINE# #INDENT# mode = self . SouthEastBorder #NEWLINE# offset = QPoint ( ( width - x ) , ( height - y ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# mode = self . EastBorder #NEWLINE# offset = QPoint ( ( width - x ) , 0 ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( y > ( height - margins . bottom ( ) ) ) : #NEWLINE# #INDENT# if ( x < ( margins . left ( ) + extra ) ) : #NEWLINE# #INDENT# mode = self . SouthWestBorder #NEWLINE# offset = QPoint ( x , ( height - y ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( x > ( width - ( margins . right ( ) + extra ) ) ) : #NEWLINE# #INDENT# mode = self . SouthEastBorder #NEWLINE# offset = QPoint ( ( width - x ) , ( height - y ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# mode = self . SouthBorder #NEWLINE# offset = QPoint ( 0 , ( height - y ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# mode = self . NoBorder #NEWLINE# offset = QPoint ( ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ( mode , offset )