Determine whether you click on an ellipse

51 Views Asked by At

For a school project I have to draw ellipses and then remove them if I click on them. What formula can be used to determine when the outer line of the ellipse with a margin of 5 pixels is clicked? Or when a filled ellipse is clicked? Clicking on a rectangle is easy but with an ellipse you don't fill the whole space so those corners should not count as part of the ellipse.