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.

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



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值