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

Bake transforms into path (experimental) messes icon position up #80

Closed
vanniktech opened this issue May 15, 2017 · 7 comments
Closed

Comments

@vanniktech
Copy link

Input Icon

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g fill="none" fill-rule="evenodd" transform="translate(-5 -4)">
        <path d="M5 4h24v24H5z"/>
        <circle cx="17" cy="16" r="5" fill="#FB4754"/>
        <g stroke="#FB4754" stroke-linecap="square" stroke-width="1.5">
            <path d="M6.629 15.765h2.828M24.543 15.765h2.828"/>
            <g>
                <path d="M17 26.371v-2.828M17 8.457V5.63"/>
            </g>
            <g>
                <path d="M9.5 23.167l2-2M22.167 10.5l2-2"/>
                <g>
                    <path d="M24.334 23.333l-2-2M11.667 10.666l-2-2"/>
                </g>
            </g>
        </g>
    </g>
</svg>

Works without Bake transforms into path

When I convert it using those options:

screen shot 2017-05-15 at 12 39 35

The image will be transformed correctly.

screen shot 2017-05-15 at 12 40 13

Does not work with Bake transforms into path

However when I activate Bake transforms into path:

screen shot 2017-05-15 at 12 40 40

The image will not be transformed correctly and is not centered:

screen shot 2017-05-15 at 12 41 03

@theBlbDan
Copy link

theBlbDan commented Aug 3, 2017

I ran into a condition where I had some <rect />'s with a transform that included translate and rotation.
I found in the VectorDrawable docs that some transforms exists in the group tag. It might be worth fixing up svg2android for these.

@vanniktech
Copy link
Author

Gentle bump on this.

@vanniktech
Copy link
Author

@yuraj11 is this project still being maintained? Otherwise I'd use the tools from the android folks instead.

@theBlbDan
Copy link

theBlbDan commented Feb 25, 2018

What tools does Google have?

@yuraj11
Copy link
Collaborator

yuraj11 commented Feb 26, 2018

It is not deprecated but also not active because I do not have that much free time to fix all the issues. SVG format is too complex and some bug fixes could introduce another bugs. Have you tried the official Android Studio svg import dialog https://developer.android.com/studio/write/vector-asset-studio.html ?

@vanniktech
Copy link
Author

That's also the one I meant with Google tools.

@yuraj11
Copy link
Collaborator

yuraj11 commented Dec 6, 2018

As this tool is deprecated and behind the official AS solution in term of conversion - you can check https://developer.android.com/studio/write/vector-asset-studio#svg - I have tried converting this SVG and It renders correctly using AS Vector Asset Studio.

@yuraj11 yuraj11 closed this as completed Dec 6, 2018
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

3 participants