android.renderscript.Matrix3f

Here are the examples of the java api class android.renderscript.Matrix3f taken from open source projects.

1. BestBlur#doDesaturate()

Project: HTextView
File: BestBlur.java
private void doDesaturate(float normalizedAmount, Allocation input, Allocation output) {
    Matrix3f m = new Matrix3f(new float[] { MathUtil.interpolate(1, 0.299f, normalizedAmount), MathUtil.interpolate(0, 0.299f, normalizedAmount), MathUtil.interpolate(0, 0.299f, normalizedAmount), MathUtil.interpolate(0, 0.587f, normalizedAmount), MathUtil.interpolate(1, 0.587f, normalizedAmount), MathUtil.interpolate(0, 0.587f, normalizedAmount), MathUtil.interpolate(0, 0.114f, normalizedAmount), MathUtil.interpolate(0, 0.114f, normalizedAmount), MathUtil.interpolate(1, 0.114f, normalizedAmount) });
    mSIGrey.setColorMatrix(m);
    mSIGrey.forEach(input, output);
}