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

随机推荐

  1. 【Android】Broadcast Receiver的基本使
  2. java鏀诲煄鐙箣璺?Android绡?--widget_
  3. Android多渠道打包总结
  4. Android 动画分析之属性动画
  5. android 保存Json数据到本地
  6. 关于Android的HAL的一些理解
  7. Android消息传递之EventBus 3.0使用详解
  8. Android攻城略地,Nokia何去何从?
  9. Cordova下android与javascript的交互
  10. 位Android开发人员的收入报告