简体   繁体   中英

Oval & ellipse in Java

Ellipse has a somewhat nifty method called intersects and you can see if it intersects with a rectangle. Two questions. One is out of curiosity..

Does anyone know what the reasoning behind that way?

Second, is there anything similar I can use with just a filled oval?

Second, is there anything similar I can use with just a filled oval?

Use the Graphics2d.fill(Shape) method for your painting. Then you can use an Ellispe2D and its intersects() method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM