Package: inkscape
Version: 0.43-4

When importing a svg file that contains a dashed line, it is correctly
displayed in inkscape but prints incorrectly. This is probably due to do
limitations in the postscript export code. I browsed through both the
Debian BTS and upstreams buglist, but found nothing exactly matching
this problem.

I'm attaching four files. All but dia.svg are generated by inkscape. The
files test.svg and test.eps are generated from scratch with inkscape to
see that printed dashed lines do work.

It seems the faulty line is: "[] 0 setdash". If I add some digits inside
those brackets, just as in the working file, the dia.eps looks alright
too.

Searching the source code for setdash shows that the relevant piece of
code is in src/extensions/internal/ps.cpp:PrintPS::print_stroke_style().
I rebuilt inkscape with noopt and nostrip, but my C++ skillz are not
good enough to get much further. The method print_stroke_style() seems
to be expanded into a myriad of functions on compile, and gdb tells me
I have to know the exact one to place a breakpoint on it.

If I single step through the code, I get as far as to do_export_ps()
before I lose track of what's happening.
--
/Martin
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/";
   xmlns:cc="http://web.resource.org/cc/";
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
   xmlns:svg="http://www.w3.org/2000/svg";
   xmlns="http://www.w3.org/2000/svg";
   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd";
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
   width="744.09448819"
   height="1052.3622047"
   id="svg2"
   sodipodi:version="0.32"
   inkscape:version="0.43"
   sodipodi:docbase="/home/cos"
   sodipodi:docname="test.svg">
  <defs
     id="defs4" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.56729519"
     inkscape:cx="372.04724"
     inkscape:cy="526.18109"
     inkscape:document-units="px"
     inkscape:current-layer="layer1"
     inkscape:window-width="1022"
     inkscape:window-height="766"
     inkscape:window-x="0"
     inkscape:window-y="0" />
  <metadata
     id="metadata7">
    <rdf:RDF>
      <cc:Work
         rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type
           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1">
    <path
       
style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:6.54961729;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:6.54961706,
 6.54961706;stroke-dashoffset:0;stroke-opacity:1"
       d="M 98.015763,254.76365 C 671.89367,197.67634 671.89367,197.67634 
671.89367,197.67634"
       id="path3057" />
  </g>
</svg>

Attachment: test.eps
Description: PostScript document

Attachment: dia.eps
Description: PostScript document

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
"http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd";>
<svg width="8in" height="8in" viewBox="0 0 1 1" preserveAspectRatio="none">
<title>SVG drawing</title>
<desc>This was produced by version 4.1 of GNU libplot, a free library for 
exporting 2-D vector graphics.</desc>
<rect x="0" y="0" width="1" height="1" style="stroke:none;fill:white;"/>
<g transform="translate(-0.03125,1.1875) scale(1,-1) scale(0.0017361) " 
xml:space="preserve" 
style="stroke:black;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10.433;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;fill:none;fill-rule:even-odd;fill-opacity:1;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size-adjust:none;letter-spacing:normal;word-spacing:normal;text-anchor:start;">
<line x1="1.5898" y1="1.5938" x2="239.7" y2="32.773" 
style="stroke-width:2.8346;stroke-dasharray:5.6692;"/>
</g>
</svg>

Reply via email to