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(安卓)圆角边框RoundRect原理
- Android(安卓)听筒播放 适配(摩托)
- 调用Android系统设置项
- android MediaRecorder录音详解
- Android—文字轮播
- Android(安卓)自定义dialog 设置宽度
- Android(安卓)Progressbar进度条显示
- Android(安卓)4.4 上实现透明导航栏和状态栏 Translucent system
- Android闹钟设置