svg-net / SVG

Fork of the ms svg library
http://svg-net.github.io/SVG/
Microsoft Public License
1.16k stars 474 forks source link

Incorrect conversion of SVG to png #918

Open comepeng opened 2 years ago

comepeng commented 2 years ago

Description

The browser renders as follows: image The Svg.net renders as follows: image

Example data

`

                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo" refX="22" refY="20" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="translate(13 16)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                    <marker xmlns="http://www.w3.org/2000/svg" id="arrowjyeoo1" refX="7" refY="16" markerUnits="strokeWidth" markerWidth="100" markerHeight="100" orient="auto">
                        <path transform="rotate(180) translate(-18 -20)" fill="#000000" d="M 0 0 L 2 4 L 0 8 L 11 4 Z"></path>
                    </marker>
                </defs><g style="pointer-events:all;background: #ff6a00;"><path stroke="black" id="spot_1" fill="none" stroke-width="1" d="M 165 60 L 165 330 M 195 60 L 195 330 M 225 60 L 225 330 M 255 60 L 255 330 M 285 60 L 285 330 M 315 60 L 315 330 M 345 60 L 345 330 M 375 60 L 375 330 M 405 60 L 405 330 M 435 60 L 435 330 M 165 60 L 435 60 M 165 90 L 435 90 M 165 120 L 435 120 M 165 150 L 435 150 M 165 180 L 435 180 M 165 210 L 435 210 M 165 240 L 435 240 M 165 270 L 435 270 M 165 300 L 435 300 M 165 330 L 435 330" nametype="gridline" transform="translate(162 -20)"></path></g></svg>`

Used Versions

V3.2.0.0

H1Gdev commented 2 years ago

latest version(v3.3.0) doesn't seem to have this issue.

output