Added preserving center point when resizing a rectangle