graphics/GraphicCommons.py
changeset 334 cf0809bc5675
parent 333 0a74fcfd4d03
child 338 87e5015330ae
equal deleted inserted replaced
333:0a74fcfd4d03 334:cf0809bc5675
   615                     width -= movex
   615                     width -= movex
   616             elif handle[0] == 3:
   616             elif handle[0] == 3:
   617                 if scaling is not None:
   617                 if scaling is not None:
   618                     movex = round_scaling(width + movex, scaling[0]) - width
   618                     movex = round_scaling(width + movex, scaling[0]) - width
   619                 if event.ShiftDown():
   619                 if event.ShiftDown():
       
   620                     movex = min(self.BoundingBox.x, movex)
   620                     x = -movex
   621                     x = -movex
   621                     width += 2 * movex
   622                     width += 2 * movex
   622                 else:
   623                 else:
   623                     width += movex
   624                     width += movex
   624             if handle[1] == 1:
   625             if handle[1] == 1:
   632                     height -= movey
   633                     height -= movey
   633             elif handle[1] == 3:
   634             elif handle[1] == 3:
   634                 if scaling is not None:
   635                 if scaling is not None:
   635                     movey = round_scaling(height + movey, scaling[1]) - height
   636                     movey = round_scaling(height + movey, scaling[1]) - height
   636                 if event.ShiftDown():
   637                 if event.ShiftDown():
       
   638                     movey = min(self.BoundingBox.y, movey)
   637                     y = -movey
   639                     y = -movey
   638                     height += 2 * movey
   640                     height += 2 * movey
   639                 else:
   641                 else:
   640                     height += movey
   642                     height += movey
   641             # Verify that new size is not lesser than minimum
   643             # Verify that new size is not lesser than minimum