有没有办法获得用Graphics2D绘制的椭圆的坐标?(Is there a way to get the coordinates for an oval drawn with Graphics2D?)
我知道'手绘'一个圆的参数方程。 我想知道是否有一种快速获取坐标的方法,因为那将是麻烦。 是的粉红色独角兽。
I know the parametric equations to 'hand draw' a circle. I would like to know if there's a quick way to get the coordinates, because that would be dope. Yay for pink unicorns.
最满意答案
使用Ellipse2D.contains(Point)方法。 您可以传递矩形rea中的所有坐标,看看它们是否在椭圆形区域中。
Use Ellipse2D.contains(Point) method. You can pass all coordinates in rectangular rea and see whether they are in the oval area.
更多推荐
发布评论