RajeshVijayakumar
RajeshVijayakumar

Reputation: 10620

How to calculate rectangle topx, topy, bottomx, bottomy from circle area android

I have Circle X,Y and radius for drawing a circle, now I want to calculate the rectangle co-ordinates from this circle x,y, radius of the circle. I need help from this.

Thanks In Advance...

Upvotes: 0

Views: 136

Answers (2)

VikasGoyal
VikasGoyal

Reputation: 3376

As you mention X and Y are center cordinates of circle then:-

topx = X - radius 
topy = Y - radius
bottomx = X + radius
bottomy = Y + radius

Upvotes: 1

Simas
Simas

Reputation: 44118

topx = X - radius
topy = Y - radius
bottomx = X + radius
bottomy = Y + radius

Upvotes: 2

Related Questions