Subject: | enhancements to linedash() method |
Date: | Tue, 02 Sep 2014 11:41:14 -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
The linedash() method in Content.pm allows up to two lengths for "on"
and "off" dashed lines. The PDF spec, while limited to one set of on/off
lengths, also permits a starting offset (in points) into the linedash
array. It might be useful to allow an optional additional parameter on
the linedash() method, to give a starting offset and pass it to PDF.
PDF limits dashed lines to two lengths (on, off). We should consider
adding an enhanced linedash() method that permits more than two lengths,
possibly permitting a very complex line pattern. It could even have
additional parameters to change linewidth and strokecolor over the
course of a pattern, and even include characters and symbols! At the
PDF::API2 level, the line produced would have to be broken down into a
number of more basic calls, and "bent" around corners (who knows what
can be done on curved lines!). Thus, it would not be a trivial exercise.
There are some optional hash parameters in linedash() whose purpose is
unclear (and undocumented). Perhaps someone started on this enhanced
linedash some time ago?