parameters: (self, x, y)
docstring: Resize and repaint the box based on the given mouse
          coordinates.
docstring_summary: Resize and repaint the box based on the given mouse
          coordinates.
docstring_tokens: Resize and repaint the box based on the given mouse coordinates .
function: def __resizeBox(self, x, y):
          """
          Resize and repaint the box based on the given mouse
          coordinates.
          """
          # Implement the correct behavior for dragging a side
          # of the box:  Only change one dimension.
          if not self.aspectRatio:
              if self.__currentCursor == wx.CURSOR_SIZENS:
                  x = None
              elif self.__currentCursor == wx.CURSOR_SIZEWE:
                  y = None
  
          x0,y0,w0,h0 = self.currentBox
          currentExtent = boxToExtent(self.currentBox)
          if x == None:
              if w0 < 1:
                  w0 += 1
              else:
                  w0 -= 1
              x = x0 + w0
          if y == None:
              if h0 < 1:
                  h0 += 1
              else:
                  h0 -= 1
              y = y0 + h0
          x1,y1 = x, y
          w, h = abs(x1-x0)+1, abs(y1-y0)+1
          if self.aspectRatio:
              w = max(w, int(h * self.aspectRatio))
              h = int(w / self.aspectRatio)
          w *= [1,-1][isNegative(x1-x0)]
          h *= [1,-1][isNegative(y1-y0)]
          newbox = (x0, y0, w, h)
          self.__drawAndErase(boxToDraw=normalizeBox(newbox), boxToErase=normalizeBox(self.currentBox))
          self.currentBox = (x0, y0, w, h)
function_tokens: def __resizeBox ( self , x , y ) : # Implement the correct behavior for dragging a side # of the box:  Only change one dimension. if not self . aspectRatio : if self . __currentCursor == wx . CURSOR_SIZENS : x = None elif self . __currentCursor == wx . CURSOR_SIZEWE : y = None x0 , y0 , w0 , h0 = self . currentBox currentExtent = boxToExtent ( self . currentBox ) if x == None : if w0 < 1 : w0 += 1 else : w0 -= 1 x = x0 + w0 if y == None : if h0 < 1 : h0 += 1 else : h0 -= 1 y = y0 + h0 x1 , y1 = x , y w , h = abs ( x1 - x0 ) + 1 , abs ( y1 - y0 ) + 1 if self . aspectRatio : w = max ( w , int ( h * self . aspectRatio ) ) h = int ( w / self . aspectRatio ) w *= [ 1 , - 1 ] [ isNegative ( x1 - x0 ) ] h *= [ 1 , - 1 ] [ isNegative ( y1 - y0 ) ] newbox = ( x0 , y0 , w , h ) self . __drawAndErase ( boxToDraw = normalizeBox ( newbox ) , boxToErase = normalizeBox ( self . currentBox ) ) self . currentBox = ( x0 , y0 , w , h )