Code example for ScriptIntrinsicBlur

Methods: setRadius

0
    public void onBar1Changed(int progress) {
        mRadius = ((float)progress) / 100.0f * MAX_RADIUS;
        if (mRadius <= 0.10f) {
            mRadius = 0.10f;
        } 
        mIntrinsic.setRadius(mRadius);
    } 
 
 
    public void createTest(android.content.res.Resources res) {
        int width = mInPixelsAllocation.getType().getX();
        int height = mInPixelsAllocation.getType().getY();
 
        Type.Builder tb = new Type.Builder(mRS, Element.U8(mRS));
        tb.setX(width);
        tb.setY(height);
        mScratchPixelsAllocation1 = Allocation.createTyped(mRS, tb.create());
        mScratchPixelsAllocation2 = Allocation.createTyped(mRS, tb.create());
 
        mScript = new ScriptC_greyscale(mRS);
        mScript.forEach_toU8(mInPixelsAllocation, mScratchPixelsAllocation1);