From: Steve Schwartz <s.schwartz@im...>  20100716 14:51:50

Hi Hez, I've found a couple of bugs in your plarc routine which I've also fixed, but since this is your code I'll leave you to look over it and commit as/when necessary. There were 3 bugs in your plarc_approx routine. Looking through the devices, it seems that with the exception of the cairo devices, all the others don't drive any native arcdrawing and so drop into your approx version. [I guess most/all ps and pdf, and svg, devices probably know how to draw an arc, so I guess these drivers could be modified, but that's another story. The approx version is perfectly adequate for most purposes.] 1 When you filled an arc, you did so by OVERWRITING the last point in the set of arc segments by the origin, so the filled arc stops short of the last theta. 2 While you check to ensure that there are at least 2 segments so you can fill the polygon, again since you overwrite the last point you only end up with a polygon with 2 points which plfill can't fill. 3 When you calculate the number of segments, you don't allow for an arc drawn backward, and so end up with a negative number of segments, which then turns into 2 which is still not enough (see (2)). All these were pretty easy to fix. I attach a test programme together with my version of your plarc_approx for you to look at and commit. All my changes (I think) have been commented with /* sjs ... */ comments. Regards, Steve  ++ Professor Steven J Schwartz Phone: +44(0)2075947660 Head, Space & Atmospheric Physics Fax: +44(0)2075947772 The Blackett Laboratory Email: s.schwartz@... Imperial College London Office: Huxley 6M67A London SW7 2AZ, U.K. Web: http://www.sp.ph.ic.ac.uk/~sjs ++ 