I want to use the ellipse function to create circles...... so for that I need to get its bounding rectangles...

How to get that?

The user will click on the client area and I'm gonna note that point and then he'll drag it to create the circle and finally he may release the mouse button and that point will be somewhere on the circumference of the circle and I'll note that too.. Now how to find its bounding rectangle ??

I'm bad at maths/geometry so please help me out tell me what do i need to learn in order to understand this or tell me how to calculate them... ty