zathras / jovial_svg

Flutter library for robust, efficient rendering of SVG static images
BSD 3-Clause "New" or "Revised" License
115 stars 21 forks source link

Masked node with attributes and use #94

Closed zathras closed 6 months ago

zathras commented 7 months ago

This SVG:

<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"
        xmlns:xlink="http://www.w3.org/1999/xlink" >
    <mask id="m" maskUnits="userSpaceOnUse">
        <circle fill="white" cx="15" cy="11" r="6" />
    </mask>
    <g transform="matrix(1 0 0 1 -5 -1)">
        <circle fill="blue" cx="15" cy="11" r="8"/>
        <circle fill="blue" cx="35" cy="11" r="8"/>
        <circle fill="blue" cx="15" cy="31" r="8"/>
        <circle fill="blue" cx="35" cy="31" r="8"/>
    </g>
    <g id="masked" mask="url(#m)" transform="matrix(1 0 0 1 -5 -1)">
        <circle fill="yellow" cx="15" cy="11" r="8"/>
    </g>
    <use xlink:href="#masked" x="20" />
    <use xlink:href="#masked" y="20" />
    <use xlink:href="#masked" x="20" y="20" />
</svg>

should render like this: Screenshot 2024-04-20 at 11 56 56 AM

but we get this: Screenshot 2024-04-20 at 11 57 56 AM

zathras commented 6 months ago

Released in 1.1.21