Skip Menu |

This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id: 98576
Status: rejected
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: philperry [...] hvc.rr.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: General notes on testing Content.pm
Date: Tue, 2 Sep 2014 21:47:40 -0400
To: bug-PDF-API2 [...] rt.cpan.org
From: <philperry [...] hvc.rr.com>
PDF::API2 v2.022 Perl 5.16.3 Windows 7 Severity: Normal While testing, updating, and documenting Content.pm and some related components, I encountered some issues that should be thought about: * I initially changed the circle() and ellipse() methods to call deg2rad() for the 0-to-360 degree sweeps, but they broke. I think we need more testing for any place that uses deg2rad() and might get angles that are 360 degrees apart. At the least, the documentation for those methods should warn about this. * In most graphics packages I've encountered, a "spline" is a curve that passes THROUGH all the points given. It's not a Bezier cubic curve with synthesized control points (as far as I can tell, although it IS often cubic). If what PDF::API2 is doing is not normally considered a spline, perhaps this particular construct should be renamed. * The code does very little testing and validation of input parameters. It would be easy to send an application into outer space by feeding it incorrect inputs. Of course, the downside is that more robust code runs more slowly. * In many places in the POD, dimensions (lengths) were specified as INTEGER points. I believe this is incorrect, and REAL values are just as acceptable. If this is so, we need to check where REAL inputs for dimensions are coerced into INTEGERs (unexpected loss of precision). * It would be nice to find official word on how much graphics and text states overlap in functionality (and how they affect each other, if at all), and add this to the POD. save() and restore() are of special interest -- do they cover everything, or are they separate for graphics and text? * The OO architecture is somewhat misleading, as it appears that there can be only one graphics object and one text object. I'm not sure what happens when you have multiple of each -- at the PDF level, I think they resolve down to affecting the same global graphic or text state, and different PDF::API2 global settings (e.g., miterlimit settings in two different graphics objects) could apply at different times. At the least, this needs to be clearly stated in the POD. * I have written a Content.pl program that exercises and demonstrates many of the methods (including those not in content.t), and provided it to the maintainer. My hope is that eventually it could be the core for a full-fledged PDF document or book explaining and documenting PDF::API2.
There are too many items here for one ticket, so I'm closing it. If spline is poorly named (I'm not knowledgeable in this area), it can be deprecated and replaced by a better-named function. Please provide documentation and a suggestion for a new name for the existing function. Input validation is a worthwhile addition, and a massive project. Patches with tests and helpful error messages are welcome.
Subject: [rt.cpan.org #98576]
Date: Thu, 18 Feb 2016 16:03:50 -0500
To: bug-PDF-API2 [...] rt.cpan.org
From: Phil M Perry <philperry [...] hvc.rr.com>
Show quoted text
>There are too many items here for one ticket, so I'm closing it.
Would you be willing to cover these items if they're broken up into single item bug reports? Show quoted text
>If spline is poorly named (I'm not knowledgeable in this area), >it can be deprecated and replaced by a better-named function. >Please provide documentation and a suggestion for a new >name for the existing function.
I'm not a mathematician, but I think what the spline() function is doing MAY be called a B-spline (or an approximation spline). If that's the case, it could just be clarified with a note in the POD. It would be nice to get some graphics experts participating in this discussion... Show quoted text
>Input validation is a worthwhile addition, and a massive project. >Patches with tests and helpful error messages are welcome.
Per discussion on bogen() method (98541), we could decide to simply die() upon any invalid input found, rather than trying to fix it up and soldier on. In some cases, users might find it useful to be able to fix up bad input, so we might want to think about hooks for handling these cases, or at least, provide commented-out code. E.g., for bogen with too small of radius, have code to set the radius to the minimum allowable size.