VectorDrawable rendering issue

前端 未结 4 1120
梦如初夏
梦如初夏 2021-02-19 01:40

I\'m having problems with the VectorDrawables introduced by the support library.

Looking around, I read about similar issues regarding bad scaling or incorrect preview i

4条回答
  •  野的像风
    2021-02-19 02:03

    In my case nothing helped until I replaced all elliptical arc commands (A) with cubic Bézier curve commands (C). Any arc could be represented with one or several Bézier curves. The whole ellipse may be replaced with four Bézier curves.

    Inkscape tends to convert arcs to Bézier curves once you start editing the path in SVG, so you can use Inkscape for conversion. It looks like Android vector renderer has a serious issues in processing A/a commands, doesn't matter if they are relative or absolute. So, just try to convert A/a => C/c.

    Note that it is not enough to change command letter, you need to set control points appropriately.

提交回复
热议问题