Subject: | bogen() handling edge cases |
Date: | Tue, 02 Sep 2014 11:19:25 -0400 |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | Phil M Perry <philperry [...] hvc.rr.com> |
PDF::API2 v2.022 Perl 5.16.3 Windows 7 severity: Wishlist
There is at least one error case for Content.pm's bogen() method. If the
radius ($r) is less than half the distance between the two points, this
is documented as an error condition, but there appears to be nothing in
the code to handle it. Normally, $r should be greater than half the
distance between the points, so as to produce four arcs. The limiting
case of $r exactly equal to half the distance degenerates to a straight
line between the points. How exactly should bogen() handle $r that is
too small? Should it fail in some manner, or treat it as exactly one
half the distance? I have updated the POD to clarify the minimum size
for $r, and submitted it to the maintainer, but the code should probably
be updated to handle this situation.