LennartEgb / vec2compose

cli tool to create jetpack compose ImageVector from vector XML files and SVG files in Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support dynamic PathFillTypes

LennartEgb opened this issue · comments

Problem

The ImageVectorParser is defaulting the pathFillType to NonZero. This information should be available by Androids VectorDrawable as the android:fillType parameter.

Solution

Add pathFillType to VectorSet. The available PathFillTypes for compose can be found here: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/PathFillType.kt

Supported fill types by SVG can be found here: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule

Implemented in #6