2

我有一些 SVG 格式的图标。将其转换为 VectorDrawables 似乎并不好。它应该是锋利的

有谁知道可能是什么原因?

这是原始的 SVG 图标: 在此处输入图像描述

以及它在 Android 上作为 VectorDrwable 的样子: 在此处输入图像描述

4

1 回答 1

1

This question is quite old, and I hope you found a solution long ago, but this seems like svg behavior that I've experienced before. In my case, the issue was that the svg was using the wrong fill-rule.

The gist is that the svg spec includes two fill-rules; nonzero, and evenodd. Android only supports nonzero prior to API level 24. You can change the fill rule directly in the VectorDrawable, but you might need to make some edits to your svg so the paths are looping in the right direction.

For anyone who encounters this later, check out this article for a great explanation.

于 2017-10-16T14:55:38.033 回答