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

John Hewson commented on PDFBOX-1861:
-------------------------------------

It just occurred to me: your multiplying of the dash array/phase needs to be 
done in StrokePath#process instead of in SetLineDashPattern because otherwise 
the following sequence of instructions will produce the wrong dash:

{code}
set ctm x-scale to 1
set dash pattern to 3 5 3
draw rect
stroke path // dash pattern is 3 5 3
set ctm x-scale to 2
draw rect
stroke path // dash pattern is 3 5 6 but should be 6 10 6
{code}

That's why SetLineWidth doesn't do a CTM transformation, is is left until 
StrokePath.

> 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: SetLineDashPattern.patch, asy-gouraud.pdf, 
> asy-gouraud.pdf-1-good.png, asy-gouraud.pdf-1-trunk.png, tracemonkey.pdf, 
> tracemonkey.pdf-2.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