title: Java Graphics drawArc with high precision
body: <p>I'm trying to draw a high precision arc in Java using AWT/Swing. The Graphics class offers the "drawArc" method to do this and in most cases this is fine. However, when the arc has a large radius (I.e. The "width" and "height" parameters are large) then the arc will not be drawn precisely. This is because the "startAngle" and "arcAngle" parameters are given as integer degrees. I'm forced to convert an angle (given in radians) to degrees and then rounding it. The loss of precision leads to the arc falling short of its actual end point (if you round down) or go further than it should (if you round up).</p>
  
  <p>I'm looking for an alternative method of drawing arcs. Preferable this should work in the same way but accept floating point angles as parameters.</p>
  
  <p>If such a function does not exist (I've not been able to find one) I would like to write it myself, but I have no idea how to go about this as the Graphics class already offers the lowest level drawing methods I can find. The only idea I had is to approximate the arc with a sequence of straight lines but to get a smooth arc you would need a lot of lines and this seems dreadfully inefficient.</p>