有没有办法获得用Graphics2D绘制的椭圆的坐标?(Is there a way to get the coordinates for an oval drawn with Graphics2D?

编程入门 行业动态 更新时间:2024-10-28 14:23:03
没有办法获得用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.

更多推荐

本文发布于:2023-07-22 03:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1216693.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:没有办法   椭圆   坐标   Graphics2D   drawn

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!