Subject: arc() sweep angle problem
Date: Tue, 02 Sep 2014 10:59:52 -0400
To: bug-PDF-API2 [...] rt.cpan.org
PDF::API2 v2.022 Perl 5.16.3 Windows 7 severity: Important
In Content.pm, the arc() method refuses to cross the 0 degree line. Instead of sweeping across the 0 degree line from a larger angle to a smaller one, it appears to always be sweeping from the smaller angle to the larger one, even if $alpha is given as the larger (starting) angle and $beta is the smaller (ending) angle.
I have submitted a POD change (documentation) to the maintainer to point out this limitation. It would probably be better to remove the limitation by splitting the arc draw into $alpha-to-360 and 0-to-$beta (if $alpha > $beta) sub-arcs.
Note that the pie() method (Content.pm) makes use of arc(), and so has this same limitation.
#
Subject: [rt.cpan.org #98538]
Date: Sat, 23 Jan 2016 13:10:03 -0500
To: bug-PDF-API2 [...] rt.cpan.org
I don't think it will be as simple as always moving counter-clockwise, although that is a possible solution. Can anyone come up with a reason to permit a clockwise direction of travel from $alpha to $beta? If there isn't, forcing CCW direction can force the arc() routine to cross over the 0 degree line (the desired result here). Otherwise, if there may be a legitimate reason (such as a future embedding of text or directional annotations such as arrowheads in a line), an %opts flag could be added to override the default CCW direction.
Thoughts?
<formatting cleanup - Mod.>