# Thread: Rectangle co-ordinates on resize

1. ## Rectangle co-ordinates on resize

Hi,

I have 2 rectangles as in the attached image.
Blue Rect(Lets say, w by h -> 300 x 80)
There's a Red Rect inside Blue rect(Lets say, co-ordinates -> Top Left point(75,15)
(w by h -> 48 x 23).

Now if the blue rect is resized to (w by h = 128 x 32), what would be the co-ordinates and width x height of the red rect inside the blue rect of (128 x 32).

Regards,
Sayan

2. ## Re: Rectangle co-ordinates on resize

Are you asking for the proportions to stretch or contract linearly?

Red rectangle: $\dfrac{128}{300}48\times \dfrac{32}{80}32$

Do something similar to find the coordinates for the top left corner.