This function adjusts the size of the rectangle by applying the cx parameter horizontally at both vertical edges and the cy parameter vertically at both horizontal edges.
The cx parameter is subtracted from the left and added to the right of the rectangle, and the cy parameter is subtracted from the bottom and added to the top of the rectangle.
If the values of the cx and cy parameters are both positive, the rectangle is enlarged and surrounds the original rectangle. Conversely, if both these values are negative, the rectangle is reduced in size and is inset with respect to the original rectangle.