You're right Keiron: the use of floats in matrix math isn't the problem. I
dug through the code some more and the rounding is occuring in the function
doubleOut() in org.apache.fop.pdf.PDFNumber. The function rounds down to
the nearest integer numbers with a decimal part of less than 0.050, and
rounds up numbers with decimal part greater than 0.950. Rototations worked
fine when I commented out the rounding code.
Riyaz
Keiron Liddle wrote
>Obviously this is a bug somewhere.
>I don't think this is due to using floats to calculate the matrix. In any
case the w3c dom interface for the >Matrix and angles etc use floats so we
cannot change the use of floats without getting them to
>change the interface.
>The rounding error is most likely when the float is converted into a
string suitable for pdf, maybe this string >is removing too much
information.
>>I've come across a possible bugs in the SVG implementation. Sample fo and
>> output file are attached.
>>
>>The rotate command at small angles (<15) does not work as expected. See
the
>>output file "rotate.pdf" from "rotate.fo." The rays should trace a
segment
>>of a circle but do not. I believe this is due to math being done in
floats
>>instead of doubles when calculating a new CTM and significant round off
>>error is being accumulated.
>>I've seen this behavior in 0.14 and 0.15.
