Skip to content

Not rendering SVG Pattern elements #2

@lucasbraum

Description

@lucasbraum

I have an SVG file that contains a <rect> element with a <pattern> as fill. When I convert this file to PNG or PDF, this rect is not rendered.

Follow the SVG code:

<svg viewBox="0 0 800 800" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="800"> <rect width="100%" height="100%" fill="url(#Svgjs1018)" x="0" y="0" class=""></rect> <pattern x="0" y="0" width="32" height="26" patternUnits="userSpaceOnUse" id="Svgjs1018"> <g> <rect x="0" class="pattern-background-rect" fill="#63c6ff" width="32" height="26"></rect> <g fill="#000000" fill-opacity="0.18"> <path d="M12,0h2v4c0,3.9-3.1,7-7,7c-3.9,0-7-3.1-7-7V0h2v4c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5V0z M7,13c-3.9,0-7,3.1-7,7v6h2v-6 c0-2.8,2.2-5,5-5c2.8,0,5,2.2,5,5v6h2v-6C14,16.1,10.9,13,7,13z M30,7v10c0,3.9-3.1,7-7,7c-3.9,0-7-3.1-7-7V7c0-3.9,3.1-7,7-7 C26.9,0,30,3.1,30,7z M28,7c0-2.8-2.2-5-5-5c-2.8,0-5,2.2-5,5v10c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5V7z"></path> </g> </g> </pattern> </svg>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions