Reputation: 10620
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
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
Reputation: 44118
topx = X - radius
topy = Y - radius
bottomx = X + radius
bottomy = Y + radius
Upvotes: 2