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.

当垃圾回收器发现一直没有被引用的实例时被调用。



更多相关文章

  1. Android 的变形矩阵 -Matrix
  2. android视图切换动画:ViewAnimator类及其子类
  3. UI组件之AdapterView及其子类(二)GridView网格视图的使用
  4. Android用户界面 UI组件--ImageView及其子类ImageButton,QuickCo
  5. Android常用控件—TextView及其子类Button、EditText等
  6. Android用户界面 UI组件--TextView及其子类(一) TextView
  7. Android基础UI篇------TextView及其子类
  8. Android用户界面 UI组件--ImageView及其子类ImageButton,QuickCo

随机推荐

  1. Android 源码分析 —— 从 Toast 出发
  2. android ddms查看线程
  3. Android ApiDemos示例解析(167):Views->L
  4. traceview进行Android性能测试
  5. Android 屏幕实现上下翻转
  6. Android的系统服务
  7. Android - Activity - 启动模式
  8. Android读写文件二
  9. android学习——处理 EditText 右下角为D
  10. Android使用videoview播放res/raw下的视