I'm pretty sure this is a bug, but I guess there might be something
special about how svg markers are handled when rendering to PDF so I
thought I should run it by here first.
I have an SVG file that renders properly when viewed with the Adobe 3.0
viewer, with batik 1.5.1 squiggle and if included as an external-graphic
it generates properly using fop.0.20.5. If I run the same .fo and .svg
through fop 1.0dev I see two sets of problems. First, if there is a
positive SVG translation being applied and stroke-opacity is 0 the
marker position is off. Second, if the translation is negative then
both the line and marker positions are incorrect and if in addition
stroke-opacity is 0 then the markers are not displayed at all. I know
it sounds a little weird. The best thing is to run it and look at it.
(code included below)
Is there, by chance, something special I need to do with my .svg or .fo
to get this to work properly with fop 1.0dev?
Thanks!
Bruce
markeroffset.svg
<svg width="540" height="407">
<defs xmlns:xlink="http://www.w3.org/1999/xlink">
<marker id="RMarker" style="fill:red"
refX="3" refY="3" markerUnits="strokeWidth"
markerWidth="6" markerHeight="8">
<polyline points="0,3 3,6 6,3 3,0" />
</marker>
<marker id="GMarker" style="fill:green"
refX="3" refY="3" markerUnits="strokeWidth"
markerWidth="6" markerHeight="8">
<polyline points="0,3 3,6 6,3 3,0" />
</marker>
<marker id="BMarker" style="fill:blue"
refX="3" refY="3" markerUnits="strokeWidth"
markerWidth="6" markerHeight="8">
<polyline points="0,3 3,6 6,3 3,0" />
</marker>
</defs>
<g xmlns:xlink="http://www.w3.org/1999/xlink">
<g style="stroke:red; fill:red;">
<path id="WithLines" style="stroke-opacity:1;
marker:url(#RMarker);"
d="M0,0L20,20" />
<path id="WithoutLines" style="stroke-opacity:0;
marker:url(#RMarker);"
d="M20,0L40,20" />
</g>
<g transform="translate(0,60)" style="stroke:blue;
fill:blue;">
<path id="WithLinesTranslatedPlus"
style="stroke-opacity:1; marker:url(#BMarker);"
d="M0,0L20,20" />
<path id="WithoutLinesTranslatedPlus"
style="stroke-opacity:0; marker:url(#BMarker);"
d="M20,0L40,20" />
</g>
<g transform="translate(0,-100)" style="stroke:green;
fill:green;">
<path id="WithLinesTranslatedMinus"
style="stroke-opacity:1; marker:url(#GMarker);"
d="M0,130L20,150" />
<path id="WithoutLinesTranslatedMinus"
style="stroke-opacity:0; marker:url(#GMarker);"
d="M20,130L40,150" />
</g>
</g>
</svg>
markeroffset.fo
<?xml version="1.0" encoding="UTF-16" ?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="29.7cm" page-width="21cm" margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm" margin-right="2.5cm">
<fo:region-body margin-top="3cm" />
<fo:region-before extent="3cm" />
<fo:region-after extent="1.5cm" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body" font-size="10pt"
font-family="Helvetica">
<fo:block>
<fo:external-graphic
src="file:markeroffset.svg"></fo:external-graphic>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]