[ 
https://issues.apache.org/jira/browse/PDFBOX-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-1861:
------------------------------------

    Attachment: asy-gouraud.pdf-1-good.png

I had a look at other operators and notice that they do a transformation, but 
the dash pattern isn't transformed in SetLineDashPattern.java. Inserting this 
code
{code}
        float[] dashArray = null;
        if (!lineDashPattern.isDashPatternEmpty())
        {
            dashArray = lineDashPattern.getCOSDashPattern().toFloatArray();
            Matrix ctm = 
context.getGraphicsState().getCurrentTransformationMatrix();
            if (ctm != null && ctm.getXScale() > 0)
            {
                for (int i = 0; i < dashArray.length; ++i)
                {
                    dashArray[i] *= ctm.getXScale();
                }
            }
        }
{code}
and using that dashArray result instead of 
lineDashPattern.getCOSDashPattern().toFloatArray() later down produces the 
attached image (which includes my change from PDFBOX-615).

> Line is incorrectly dashed
> --------------------------
>
>                 Key: PDFBOX-1861
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1861
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>         Environment: W7
>            Reporter: Tilman Hausherr
>            Priority: Minor
>         Attachments: asy-gouraud.pdf, asy-gouraud.pdf-1-good.png, 
> asy-gouraud.pdf-1-trunk.png
>
>
> The line in the attached page should be dashed differently than it is in the 
> rendering.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to