已知Graphics对象g,获得Graphics2D对象g2d,然后,用圆角长方形类创建对象circle,该对象的左上角坐标是(30,40),半径是50。请写出实现以上要求的Java代码。
Graphics2Dg2d=(Graphics2D)g;
RoundRectangle2D circle=new RoundRectangle2.Double(30,40,100,100,100,100);
已知Graphics对象g,获得Graphics2D对象g2d,然后,用圆角长方形类创建对象circle,该对象的左上角坐标是(30,40),半径是50。请写出实现以上要求的Java代码。
Graphics2Dg2d=(Graphics2D)g;
RoundRectangle2D circle=new RoundRectangle2.Double(30,40,100,100,100,100);