Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在java中旋转椭圆形状?即它的半轴不平行于坐标轴?
PS 我不仅需要绘制这个椭圆,还需要将它作为形状对象存储在内存中。
只需取一个Ellipse2D对象并对其应用AffineTransform旋转,不是吗?
Ellipse2D
AffineTransform
AffineTransform.getRotateInstance(Math.PI / 4) .createTransformedShape(new Ellipse2D.Double(0, 0, 2, 1));