Methods Summary |
---|
protected android.graphics.Shader | copy()
final Shader copy = new Shader();
copyLocalMatrix(copy);
return copy;
|
protected void | copyLocalMatrix(android.graphics.Shader dest)
if (mLocalMatrix != null) {
final Matrix lm = new Matrix();
getLocalMatrix(lm);
dest.setLocalMatrix(lm);
} else {
dest.setLocalMatrix(null);
}
|
protected void | finalize()
try {
super.finalize();
} finally {
nativeDestructor(native_instance);
}
|
public boolean | getLocalMatrix(Matrix localM)Return true if the shader has a non-identity local matrix.
if (mLocalMatrix != null) {
localM.set(mLocalMatrix);
return !mLocalMatrix.isIdentity();
}
return false;
|
long | getNativeInstance()
return native_instance;
|
protected void | init(long ni)Initialization step that should be called by subclasses in their
constructors. Calling again may result in memory leaks.
native_instance = ni;
|
private static native void | nativeDestructor(long native_shader)
|
private static native void | nativeSetLocalMatrix(long native_shader, long matrix_instance)
|
public void | setLocalMatrix(Matrix localM)Set the shader's local matrix. Passing null will reset the shader's
matrix to identity.
mLocalMatrix = localM;
nativeSetLocalMatrix(native_instance, localM == null ? 0 : localM.native_instance);
|