如何绘制这些自定义形状? [英] How do i draw these kinds custom shape?

查看:109
本文介绍了如何绘制这些自定义形状?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下设计,并且需要尽可能不使用png文件进行制作。我已经在png文件的帮助下完成了此操作,但是我在考虑是否还有其他以性能为中心的方法。

I have the following design and need to make without using png file if possible. I have done this with the help of png file but i am thinking if there is any other way which is performance centric.

我已经在png文件的帮助下完成了此设计

I have done this design with the help of png file

https://pasteboard.co/Is3RtJY.png

我怎么画这个

推荐答案

PNG图像很适合应用,但是,您可以在自己的应用中使用另一种选择应用程序是您可以使用Webp类型的图像而不是png(大小非常小),因此,这将有助于减小应用程序的apk文件大小。
在android studio中,您可以将png图像转换为webp图像。您可以做的另一件事是将png转换为相关的矢量图形(SVG),然后将该SVG导入为可绘制。像png和webp图像一样,您不需要根据设备密度添加图像,但是它将自动维护,这意味着当需要图像时,它将根据设备密度进行绘制。

PNG images are good for application but, Another option you can use in your application is that you can use webp type images instead of png, which is very smaller in size so, it will help in decreasing the apk file size of the application. In the android studio you can convert png image to webp image. Another best thing you can do is convert png to related vector graphic(SVG) and then import that SVG as drawable. Like for png and webp images you will not needed to add images according to device density but it will be automatically maintained means when the image will be needed it will be drawn according to the device density.

有许多网站可以帮助将png转换为SVG,但我更喜欢 https:// www。 vectorizer.io/

Many websites are available which can help to convert the png to SVG but I prefer https://www.vectorizer.io/

这篇关于如何绘制这些自定义形状?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆