Android draw path

南楼画角 提交于 2019-12-03 08:40:49

Yes, it is better to reset the path and set the points rather than instatiating a new one. This prevents excessive allocation of memory, which can lead to frequent garbage collection. When the GC runs the graphics may pause for a moment, especially on older devices so you want to keep this to a minimum.

The reset() and rewind() methods both have pretty much the same effect, except that rewind() keeps the internal data structure intact, which can improve performance particularly if your path always has the same number of points.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!