N
N
NazarJs2019-11-16 03:28:27
JavaScript
NazarJs, 2019-11-16 03:28:27

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

1 answer(s)
R
RAX7, 2019-11-16
@NazarJs

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 question

Ask a Question

731 491 924 answers to any question