Skip to content

Error parsing SVGs #85

@enarve

Description

@enarve

Hello, I tried SwiftDraw to render simple generated avatars SVGs from effigy. These avatars look like this. However, SVG initializers return nil and I get [parsing error] example.svg error: invalid message in the console. I tried both rendering SVG(data:) from api and SVG(named:) from the file I put in the bundle. If I change file contents to package's sample SVGs, it works.

This SVG does not work:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" style="shape-rendering: crispEdges">
<rect x="0" y="0" width="32" height="32" fill="rgb(237,139,107,255)"/><rect x="0" y="0" width="4" height="4" fill="rgb(128,24,64,255)"/><rect x="4" y="0" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="24" y="0" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="28" y="0" width="4" height="4" fill="rgb(128,24,64,255)"/><rect x="0" y="4" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="4" y="4" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="12" y="4" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="16" y="4" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="24" y="4" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="28" y="4" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="12" y="8" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="16" y="8" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="0" y="12" width="4" height="4" fill="rgb(128,24,64,255)"/><rect x="12" y="12" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="16" y="12" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="28" y="12" width="4" height="4" fill="rgb(128,24,64,255)"/><rect x="0" y="16" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="4" y="16" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="8" y="16" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="20" y="16" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="24" y="16" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="28" y="16" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="8" y="20" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="20" y="20" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="0" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="4" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="8" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="12" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="16" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="20" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="24" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="28" y="24" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="0" y="28" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="4" y="28" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="8" y="28" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="20" y="28" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="24" y="28" width="4" height="4" fill="rgb(58,185,32,255)"/><rect x="28" y="28" width="4" height="4" fill="rgb(58,185,32,255)"/>
</svg>

Thank you for the package and for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions