private static void paintArc(Graphics g, RemoteArc arc, boolean fill) { try { Rectangle bounds = arc.getBounds(); if (fill) g.fillArc( bounds.x, bounds.y, bounds.width, bounds.height, arc.getStartAngle(), arc.getEndAngle()); else g.drawArc( bounds.x, bounds.y, bounds.width, bounds.height, arc.getStartAngle(), arc.getEndAngle()); } catch (Exception e) { e.printStackTrace(); // System.out.println(e); } }
private static void paintArc2D(Graphics g, RemoteArc arc, boolean fill) { Graphics2D g2d = (Graphics2D) g; try { // Rectangle bounds = arc.getBounds(); Arc2D.Double arc2D = new Arc2D.Double( arc.getX(), arc.getY(), arc.getWidth(), arc.getHeight(), arc.getStartAngle(), arc.getEndAngle(), Arc2D.OPEN); if (fill) g2d.fill(arc2D); else g2d.draw(arc2D); } catch (Exception e) { e.printStackTrace(); // System.out.println(e); } }