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

Svg becomes blank after conversion #50

Closed
raymondctc opened this issue May 26, 2016 · 1 comment
Closed

Svg becomes blank after conversion #50

raymondctc opened this issue May 26, 2016 · 1 comment

Comments

@raymondctc
Copy link

raymondctc commented May 26, 2016

Here's my original SVG exported via Sketch

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <!-- Generator: Sketch 3.8.2 (29753) - http://www.bohemiancoding.com/sketch -->
    <title>vector/icn-list-09f</title>
    <desc>Created with Sketch.</desc>
    <defs></defs>
    <g id="Asset" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <g id="vector/icn-list-09f">
            <g id="icon" transform="translate(24.000000, 24.000000) scale(-1, 1) translate(-24.000000, -24.000000) ">
                <polygon id="background" points="0 0 48 0 48 48 0 48"></polygon>
                <path d="M6,28 L14,28 L14,20 L6,20 L6,28 L6,28 Z M6,38 L14,38 L14,30 L6,30 L6,38 L6,38 Z M6,18 L14,18 L14,10 L6,10 L6,18 L6,18 Z M16,28 L42,28 L42,20 L16,20 L16,28 L16,28 Z M16,38 L42,38 L42,30 L16,30 L16,38 L16,38 Z M16,10 L16,18 L42,18 L42,10 L16,10 L16,10 Z" id="Shape" fill="#0099FF"></path>
            </g>
        </g>
    </g>
</svg>

This is the XML after conversion

<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="48dp"
        android:height="48dp"
        android:viewportWidth="48"
        android:viewportHeight="48">

    <group>
        <group>
            <group
                android:translateX="-24.000000"
                android:translateY="-24.000000"
                android:scaleX="-1">
                <path
                    android:strokeWidth="1"
                    android:pathData="M 0 0 L 48 0 L 48 48 L 0 48 Z" />
                <path
                    android:fillColor="#0099FF"
                    android:strokeWidth="1"
                    android:pathData="M6,28 L14,28 L14,20 L6,20 L6,28 L6,28 Z M6,38 L14,38 L14,30 L6,30 L6,38 L6,38 Z
M6,18 L14,18 L14,10 L6,10 L6,18 L6,18 Z M16,28 L42,28 L42,20 L16,20 L16,28
L16,28 Z M16,38 L42,38 L42,30 L16,30 L16,38 L16,38 Z M16,10 L16,18 L42,18 L42,10
L16,10 L16,10 Z" />
            </group>
        </group>
    </group>
</vector>

However, the generated asset becomes a blank image

@yuraj11
Copy link
Collaborator

yuraj11 commented May 26, 2016

#44
evenodd rule is not supported in android (here is how to fix it https://github.com/a-student/SvgToVectorDrawableConverter#manual-editing)

@yuraj11 yuraj11 closed this as completed Jun 22, 2016
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

2 participants