[ 
https://issues.apache.org/jira/browse/PDFBOX-1931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13922307#comment-13922307
 ] 

John Hewson edited comment on PDFBOX-1931 at 3/6/14 11:03 AM:
--------------------------------------------------------------

Looking at getXScale() it doesn't match its description, the x-scaling factor 
of the matrix is simply element 0, there's no calculation needed. But 
getXScale() computes something else:

{code}
xScale = (float)Math.sqrt(Math.pow(single[0], 2)+
                          Math.pow(single[1], 2));
{code}

Where {{single\[0]}} is x-scale and {{single\[1]}} is x-shear, the result is 
apparently the magnitude of the vector these form.

Given that TextPosition is the only class which uses getXScale() and its value 
is never used anywhere I suspect that something is amiss.


was (Author: jahewson):
Looking at getXScale() it doesn't match its description, the x-scaling factor 
of the matrix is element 0. Iinstead it computes something which is not the 
x-scaling factor:

{code}
xScale = (float)Math.sqrt(Math.pow(single[0], 2)+
                          Math.pow(single[1], 2));
{code}

Where {{single\[0]}} is x-scale and {{single\[1]}} is x-shear, the result is 
apparently the magnitude of the vector these form.

Given that TextPosition is the only class which uses getXScale() and its value 
is never used anywhere I suspect that something is amiss.

> Radial shading is missing
> -------------------------
>
>                 Key: PDFBOX-1931
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1931
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.0
>            Reporter: John Hewson
>              Labels: shading, shadingpattern
>         Attachments: pdfbox-1931.pdf-1.png, uniekekans_test.pdf
>
>
> The attached file contains a radial shading fill which is missing. 
> RadialShadingContext#calculateInputValues is returning NaN which seems to be 
> incorrect.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to