Answer the question
In order to leave comments, you need to log in
How to fit Ellipse into a rectangle?
How to properly fit Ellipse into a rectangle that is created inside the intersection area of two other rectangles?
I messed up something in my code and Ellipse stopped fitting into the intersection area. Help deal with the problem!
Answer the question
In order to leave comments, you need to log in
You've got it all mixed up. The drawEllipse method takes in coordinates, and you pass in the coordinates and size of the rectangle. In addition, the center and radius of the ellipse are incorrectly calculated. And look at lines 35-38, the linter gives you a warning there for a reason.
Keep the corrected version
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question