How to convert a radius value to a percentage refering to the parent box?

165 Views Asked by At

I know the width and height of the outer box. I also know the radius of the large circle inside. All values are in absolute values. My question is how to convert the value of the radius to a percentage refering to the size of the outer box? So, if the outer box resizes, the radius of the circle adjusts accordingly.

1

I suspect that I must do some kind of ratio between width and height of the outer box but I do not know how. Thank you.

EDIT sorry, yes the (x,y) of the center of the circle are know.