android - Shader 着色器 翻译
Shader is the based class for objects that return horizontal spans of colors during drawing. A subclass of Shader is installed in a Paint calling paint.setShader(shader). After that any object (other than a bitmap) that is drawn with that paint will get its color(s) from the shader.
Shader类作为基类主要是返回绘制时的水平距离,它的子类可以通过Paint.setShader(shader)添加到Paint里,然后获取shader的颜色进行绘制。
构造函数
Shader()
方法
public boolean getLocalMatrix (Matrix localM)
Return true if the shader has a non-identity local matrix.
localM :If not null, it is set to the shader's local matrix.
如果shader有一个不一致的本地矩阵时返回true;
localM 如果不为空,设置localM为shader的本地矩阵。
setLocalMatrix(Matrix localM)
Set the shader's local matrix. Passing null will reset the shader's matrix to identity
localM The shader's new local matrix, or null to specify identity
设置shader的本地矩阵,设置null时将重设shader的矩阵为本地矩阵
localM shader的新矩阵,为null时指定为本地矩阵。
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
当垃圾回收器发现一直没有被引用的实例时被调用。
更多相关文章
- Android 的变形矩阵 -Matrix
- android视图切换动画:ViewAnimator类及其子类
- UI组件之AdapterView及其子类(二)GridView网格视图的使用
- Android用户界面 UI组件--ImageView及其子类ImageButton,QuickCo
- Android常用控件—TextView及其子类Button、EditText等
- Android用户界面 UI组件--TextView及其子类(一) TextView
- Android基础UI篇------TextView及其子类
- Android用户界面 UI组件--ImageView及其子类ImageButton,QuickCo