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.
我画了一个椭圆g.fillOval (0, 0, 100, 40);如何从图形中心以任意角度转动它?
g.fillOval (0, 0, 100, 40)
使用Graphics2D,您可以执行以下操作:
Graphics2D
Graphics2D g2 = (Graphics2D)g; g2.rotate(angle, 51, 21);