Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize-clips incorrect with clipPath #226

Open
xvrh opened this issue Jan 5, 2024 · 0 comments
Open

optimize-clips incorrect with clipPath #226

xvrh opened this issue Jan 5, 2024 · 0 comments

Comments

@xvrh
Copy link
Contributor

xvrh commented Jan 5, 2024

I have this icon

<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" fill="none">
    <defs>
        <clipPath id="a">
            <path fill="#fff" d="M0 0h15v15H0z"/>
        </clipPath>
    </defs>
    <g fill="#374957" clip-path="url(#a)">
        <path d="M11.875 1.25h-.625V.625a.625.625 0 1 0-1.25 0v.625H5V.625a.625.625 0 0 0-1.25 0v.625h-.625A3.129 3.129 0 0 0 0 4.375v7.5A3.129 3.129 0 0 0 3.125 15h8.75A3.129 3.129 0 0 0 15 11.875v-7.5a3.129 3.129 0 0 0-3.125-3.125ZM1.25 4.375A1.875 1.875 0 0 1 3.125 2.5h8.75a1.875 1.875 0 0 1 1.875 1.875V5H1.25v-.625Zm10.625 9.375h-8.75a1.875 1.875 0 0 1-1.875-1.875V6.25h12.5v5.625a1.875 1.875 0 0 1-1.875 1.875Z"/>
        <path d="M7.5 10.313a.937.937 0 1 0 0-1.875.937.937 0 0 0 0 1.874ZM4.375 10.313a.937.937 0 1 0 0-1.875.937.937 0 0 0 0 1.874ZM10.625 10.313a.937.937 0 1 0 0-1.875.937.937 0 0 0 0 1.874Z"/>
    </g>
</svg>

When I compile it with vector_graphics_compiler like this:

dart run vector_graphics_compiler -i assets/calendar.svg -o assets/calendar.vec

Screenshot 2024-01-05 at 11 33 27

If I pass --no-optimize-clips to the compiler, it works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant