android - Path.reset 与 Path.rewind

标签 android reset graphicspath

在 android 中,path.reset()path.rewind() 有什么区别?

docs这么说

public void reset ()

Clear any lines and curves from the path, making it empty. This does NOT change the fill-type setting.

public void rewind ()

Rewinds the path: clears any lines and curves from the path but keeps the internal data structure for faster reuse.

但这到底意味着什么?

什么时候应该使用其中一个?

最佳答案

Path.reset => 你的路径是reseter。返回创建一个:new Path()

Path.rewind => 清空 Path 的内容,从列表返回 make .clear()

关于android - Path.reset 与 Path.rewind,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11505617/

相关文章:

c# - 使用 Graphics.FillPath 奇怪地绘制 GraphicsPath

c# - C#中使用GEO坐标绘制 map

java - 主屏幕小部件运行时,数据对象的静态数组列表是否会导致内存泄漏

html - 在 Orbeon Xforms 中按两次转义字符时如何处理重置行为

twitter-bootstrap - TbButton 重置不适用于 redactorRow

javascript - 我可以重置已使用 Javascript/jQuery 删除选项的选择框吗?

android - Gradle sync更新到2.0.0-rc2版本后找不到add-on

java - 安卓按钮无法点击

java - 修改Android源的核心Java库以在应用程序中使用