Bug 53431 - [PATCH] SVG line dash pattern wrong in PDF
Summary: [PATCH] SVG line dash pattern wrong in PDF
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: pdf (show other bugs)
Version: all
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-17 23:15 UTC by Luis Bernardo
Modified: 2012-10-27 17:55 UTC (History)
0 users



Attachments
patch (603 bytes, application/octet-stream)
2012-06-17 23:15 UTC, Luis Bernardo
Details
source example to test bug fix (4.65 KB, application/x-gzip)
2012-06-17 23:24 UTC, Luis Bernardo
Details
updated patch (2.52 KB, patch)
2012-06-24 15:34 UTC, Luis Bernardo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Bernardo 2012-06-17 23:15:11 UTC
Created attachment 28951 [details]
patch

This issue is discussed in a recent fop-dev thread: http://marc.info/?l=fop-dev&m=133817089626596&w=2.

In simple terms, the following SVG element with two paths is rendered wrong in PDF (but not in PS). The second line appears dashed when it should not be. If the paths are flipped the rendering is correct. 

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" overflow="auto">
    <path d="M 0  0 L 100  0" fill="white" stroke="black" stroke-width="1" stroke-dasharray="5"/>
    <path d="M 0 10 L 100 10" fill="white" stroke="red" stroke-width="3"/>
</svg>
Comment 1 Luis Bernardo 2012-06-17 23:24:29 UTC
Created attachment 28952 [details]
source example to test bug fix

the attached file contains a test FO and SVG file, and the PDF output before and after the fix.
Comment 2 Luis Bernardo 2012-06-24 15:34:26 UTC
Created attachment 28991 [details]
updated patch

this patch, which replaces the previous one, adds a simple unit test to the original fix.
Comment 3 Glenn Adams 2012-06-24 19:01:59 UTC
(In reply to comment #2)
> Created attachment 28991 [details]
> updated patch
> 
> this patch, which replaces the previous one, adds a simple unit test to the
> original fix.

applied at http://svn.apache.org/viewvc?rev=1353311&view=rev

thanks luis! please review and close