piqnt / svgexport

SVG to PNG/JPEG command-line tool and Node.js module
927 stars 85 forks source link

Line marker rotation #52

Closed byronigoe closed 6 years ago

byronigoe commented 6 years ago

This project seems to be abandoned, but I thought I would everyone aware of these issues. See the attached JPG rendered by this library, and PNG rendered by Inkscape. Notice the rotation of the marker (arrowhead) on line 4. The SVG is copied below. JPG correct

The SVG is:

<?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://creativecommons.org/ns#"
   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://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   width="1100"
   height="966"
   viewBox="0 0 1100.0001 966.00007"
   id="svg2"
   version="1.1"
   inkscape:version="0.91 r13725"
   sodipodi:docname="StrokeMarkers.svg"
   inkscape:export-filename="C:\Users\Byron\Dropbox\GUNKS APPS\Lincoln Woods Bouldering\Images\PNG\MainWall2to7.png"
   inkscape:export-xdpi="90"
   inkscape:export-ydpi="90">
  <defs
     id="defs4">
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="marker5662"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         id="path5664"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:isstock="true"
       style="overflow:visible"
       id="marker5622"
       refX="0"
       refY="0"
       orient="auto"
       inkscape:stockid="TriangleOutM"
       inkscape:collect="always">
      <path
         transform="scale(0.4,0.4)"
         style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1pt;stroke-opacity:1"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         id="path5624"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="TriangleOutM"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         id="path4328"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutL"
       orient="auto"
       refY="0"
       refX="0"
       id="TriangleOutL"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         id="path4325"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.8,0.8)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="Arrow2Mend"
       orient="auto"
       refY="0"
       refX="0"
       id="Arrow2Mend"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         id="path4210"
         style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
         transform="scale(-0.6,-0.6)"
         inkscape:connector-curvature="0" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="marker10347-3-0-9-8"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         inkscape:connector-curvature="0"
         id="path10349-0-9-4-7"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="marker10347-3-0-9-8-4"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         inkscape:connector-curvature="0"
         id="path10349-0-9-4-7-9"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="marker10347-3"
       style="overflow:visible"
       inkscape:isstock="true"
       inkscape:collect="always">
      <path
         inkscape:connector-curvature="0"
         id="path10349-0"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="marker10347-3-6"
       style="overflow:visible"
       inkscape:isstock="true"
       inkscape:collect="always">
      <path
         inkscape:connector-curvature="0"
         id="path10349-0-4"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#0000ff;fill-opacity:1;fill-rule:evenodd;stroke:#0000ff;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)" />
    </marker>
    <marker
       inkscape:stockid="TriangleOutM"
       orient="auto"
       refY="0"
       refX="0"
       id="marker10347-3-0"
       style="overflow:visible"
       inkscape:isstock="true">
      <path
         inkscape:connector-curvature="0"
         id="path10349-0-9"
         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
         style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1pt;stroke-opacity:1"
         transform="scale(0.4,0.4)" />
    </marker>
  </defs>
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.54865424"
     inkscape:cx="643.50151"
     inkscape:cy="479.35472"
     inkscape:document-units="px"
     inkscape:current-layer="layer2"
     showgrid="false"
     fit-margin-top="0"
     fit-margin-left="0"
     fit-margin-right="0"
     fit-margin-bottom="0"
     units="px"
     borderlayer="true" />
  <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" />
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g
     inkscape:groupmode="layer"
     id="layer2"
     inkscape:label="Lines"
     style="display:inline"
     transform="translate(0,-100.66704)">
    <path
       style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker10347-3-0-9-8)"
       d="M 439.86822,672.71053 342.45218,289.03406"
       id="path5574-4-1-1-4-0"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cc" />
    <path
       style="opacity:1;fill:none;fill-opacity:1;stroke:#00ff00;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker5622)"
       d="m 159.49699,746.03795 c 1.07387,-47.35372 -2.51647,-96.0655 9.73813,-141.84758 6.25585,-23.37128 21.78165,-43.2207 31.86698,-65.21248 7.28264,-15.88033 10.02264,-34.31305 20.67145,-48.16312 11.95181,-15.54478 34.23456,-20.83933 46.27993,-36.31173 16.94398,-21.76472 22.09261,-50.55092 33.55116,-75.64083 10.1503,-22.22533 26.67202,-42.32485 31.1776,-66.3393 1.31404,-7.00373 -0.0482,-14.36965 -1.46133,-21.32781"
       id="path5574"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="caaaaaac" />
    <g
       style="display:inline"
       id="g4781-7"
       transform="translate(-674.88683,-34.841019)">
      <circle
         r="16.31518"
         cy="782.89154"
         cx="834.38379"
         id="path4547-4-7"
         style="opacity:1;fill:#00ff00;fill-opacity:1;stroke:#00ff00;stroke-width:7.3696394;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
      <text
         sodipodi:linespacing="125%"
         id="text4549-5-5"
         y="794.11438"
         x="834.0343"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
         xml:space="preserve"><tspan
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle"
           y="794.11438"
           x="834.0343"
           id="tspan4551-5-45"
           sodipodi:role="line">2</tspan></text>
    </g>
    <circle
       style="opacity:1;fill:#ff0000;fill-opacity:1;stroke:#ff0000;stroke-width:7.3696394;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
       id="path4547-4-7-3-3"
       cx="439.60718"
       cy="674.12878"
       r="16.31518" />
    <text
       xml:space="preserve"
       style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
       x="439.25769"
       y="685.35162"
       id="text4549-5-5-0-7"
       sodipodi:linespacing="125%"><tspan
         sodipodi:role="line"
         id="tspan4551-5-45-2-8"
         x="439.25769"
         y="685.35162"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000;">3</tspan></text>
    <path
       style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker10347-3-0-9-8-4)"
       d="m 749.0813,413.59291 c 0,0 17.51636,-63.18589 32.10069,-92.31984 22.80378,-45.55323 85.48508,-126.68178 85.48508,-126.68178"
       id="path5574-4-1-1-4-0-8"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cac" />
    <g
       style="display:inline"
       id="g9047-1"
       transform="translate(450.17572,-413.93865)">
      <circle
         r="16.31518"
         cy="689.8175"
         cx="357.66449"
         id="path4547-4-7-3-3-1"
         style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:7.3696394;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
      <text
         sodipodi:linespacing="125%"
         id="text4549-5-5-0-7-8"
         y="701.04034"
         x="357.315"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
         xml:space="preserve"><tspan
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff"
           y="701.04034"
           x="357.315"
           id="tspan4551-5-45-2-8-8"
           sodipodi:role="line">7</tspan></text>
    </g>
    <path
       style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker10347-3)"
       d="M 639.01269,729.08792 622.09983,184.40509"
       id="path5574-4-1"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="cc" />
    <g
       style="display:inline"
       id="g13453"
       transform="translate(468.43599,53.374034)">
      <circle
         r="16.31518"
         cy="677.13214"
         cx="170.54263"
         id="path4547-4-7-3"
         style="opacity:1;fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:7.3696394;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
      <text
         sodipodi:linespacing="125%"
         id="text4549-5-5-0"
         y="688.35498"
         x="170.19315"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
         xml:space="preserve"><tspan
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff"
           y="688.35498"
           x="170.19315"
           id="tspan4551-5-45-2"
           sodipodi:role="line">5</tspan></text>
    </g>
    <path
       style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#0000ff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker10347-3-6)"
       d="m 751.72973,702.88665 c 1.59336,-68.81149 1.98834,-137.66407 -1.53444,-206.4258 -1.44564,-30.51566 5.59983,-62.14415 -6.04474,-91.48509 -11.75244,-31.35277 -23.65925,-62.65838 -32.66848,-94.95599 -11.74536,-42.15334 -31.08194,-81.27148 -52.1107,-119.45364"
       id="path5574-4-1-7"
       inkscape:connector-curvature="0" />
    <g
       style="display:inline"
       id="g13453-8"
       transform="translate(581.15303,27.172763)">
      <circle
         r="16.31518"
         cy="677.13214"
         cx="170.54263"
         id="path4547-4-7-3-2"
         style="opacity:1;fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:7.3696394;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
      <text
         sodipodi:linespacing="125%"
         id="text4549-5-5-0-9"
         y="688.35498"
         x="170.19315"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
         xml:space="preserve"><tspan
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff"
           y="688.35498"
           x="170.19315"
           id="tspan4551-5-45-2-4"
           sodipodi:role="line">6</tspan></text>
    </g>
    <path
       style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#00ff00;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker10347-3-0)"
       d="m 540.35852,717.01245 c 0,0 -12.43375,-106.74387 -16.91286,-160.28016 -3.13475,-37.46794 -6.4766,-74.98551 -6.96744,-112.58115 -0.49075,-37.5889 0.53281,-75.27492 4.02516,-112.70445 4.16031,-44.58842 20.1258,-132.83024 20.1258,-132.83024"
       id="path5574-4-1-1"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="caaac" />
    <g
       style="display:inline"
       id="g4781-7-0"
       transform="translate(-293.98379,-64.460849)">
      <circle
         r="16.31518"
         cy="782.89154"
         cx="834.38379"
         id="path4547-4-7-1"
         style="opacity:1;fill:#00ff00;fill-opacity:1;stroke:#00ff00;stroke-width:7.3696394;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
      <text
         sodipodi:linespacing="125%"
         id="text4549-5-5-4"
         y="794.11438"
         x="834.0343"
         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
         xml:space="preserve"><tspan
           style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:31.25px;line-height:125%;font-family:'Trebuchet MS';-inkscape-font-specification:'Trebuchet MS, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle"
           y="794.11438"
           x="834.0343"
           id="tspan4551-5-45-7"
           sodipodi:role="line">4</tspan></text>
    </g>
  </g>
</svg>
shakiba commented 6 years ago

Thanks for reporting, however I don't think this is an svgexport issue:

Also you are welcome to help to maintain the library! :)

shakiba commented 6 years ago

I'm going to close this, please feel free to open it if required.