Search code examples
javagraphics2d

How to draw bottom half of circle drawArc Java


How does one draw the bottom half of a circle with drawArc in Java?

    g.drawArc(0,0,300,300, 0,-180); //this doesn't work

Solution

  • Make sure the starting direction is rotated as well:

    g.drawArc(0, 0, 300, 300, 180, -180);