[英]Adaptive Icon shapes path
This is how Launcher3 defines icon shape path. 这就是Launcher3定义图标形状路径的方式。
<string-array translatable="false" name="icon_shape_override_paths_values">
<item>M50,0L100,0 100,100 0,100 0,0z</item>
<item>M50,0 C10,0 0,10 0,50 0,90 10,100 50,100 90,100 100,90 100,50 100,10 90,0 50,0 Z</item>
<item>M50 0A50 50,0,1,1,50 100A50 50,0,1,1,50 0</item>
<item>M50,0A50,50,0,0 1 100,50 L100,85 A15,15,0,0 1 85,100 L50,100 A50,50,0,0 1 50,0z</item>
</string-array>
These correspond to square, squircle, circle and teardrop accordingly. 这些分别对应于正方形,鼠形,圆形和泪珠。
Now I wonder how can I create my own shape like this. 现在我想知道如何创建自己的形状。 I want to draw a hexagon.
我想画一个六角形。
Try something like: 尝试类似:
<item>M 50,0 L 100,25, 100,75, 50,100, 0,75, 0,25 Z</item>
Example: 例:
svg { background: linen; }
<svg width="100" height="100"> <path d="M 50,0 L 100,25, 100,75, 50,100, 0,75, 0,25 Z"/> </svg>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.