Version: 0.5.7 (using 3.5.7, Gentoo) Compiler: gcc version 3.4.6 (Gentoo 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10) OS: Linux (i686) release 2.6.22-gentoo-r9 Type 4 PDF functions can use the PostScript operator "atan" which roughly corresponds to the libc atan2 function. However, its result should be in degrees between 0 and 360. kpdf seems to calculate a range between -pi and pi. For the details of this operator, the PDF specification references the PostScript Language Reference, third edition, where the atan operator is described in detail on page 535 [1]. I'll attach a test case. [1] http://www.adobe.com/products/postscript/pdfs/PLRM.pdf
Created attachment 23496 [details] Test case This test case does something like a conical gradient using a shading based on a Type 4 function. Originally the result of atan was divided by 90, but this yields almost black on kpdf. By changing the denominator to 5, the gradient is recognizable, while still being not too thin in the correct rendering of e.g. acroread. The rendering of kpdf and acroread can therefore be compared easily.
SVN commit 772669 by aacid: atan operator must yield a degrees result between 0 and 360 BUG: 157497 M +4 -2 Function.cc WebSVN link: http://websvn.kde.org/?view=rev&revision=772669
That was fast! Looking at the code in svn, however, it looks like sin and cos were dealing in radians as well, so they should be modified as well in order to accept an argument given in degrees, as the PostScript reference states.
SVN commit 772693 by aacid: PS cos and sin input values are degrees so convert to radians so we can use the cos and sin cmath functions CCBUG: 157497 M +2 -2 Function.cc WebSVN link: http://websvn.kde.org/?view=rev&revision=772693