Methods Summary |
---|
public static android.renderscript.ScriptIntrinsicBlur | create(RenderScript rs, Element e)Create an intrinsic for applying a blur to an allocation. The
default radius is 5.0.
Supported elements types are {@link Element#U8_4}
if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) {
throw new RSIllegalArgumentException("Unsuported element type.");
}
long id = rs.nScriptIntrinsicCreate(5, e.getID(rs));
ScriptIntrinsicBlur sib = new ScriptIntrinsicBlur(id, rs);
sib.setRadius(5.f);
return sib;
|
public void | forEach(Allocation aout)Apply the filter to the input and save to the specified
allocation.
forEach(0, (Allocation) null, aout, null);
|
public void | forEach(Allocation aout, Script.LaunchOptions opt)Apply the filter to the input and save to the specified
allocation.
forEach(0, (Allocation) null, aout, null, opt);
|
public Script.FieldID | getFieldID_Input()Get a FieldID for the input field of this intrinsic.
return createFieldID(1, null);
|
public Script.KernelID | getKernelID()Get a KernelID for this intrinsic kernel.
return createKernelID(0, 2, null, null);
|
public void | setInput(Allocation ain)Set the input of the blur.
Must match the element type supplied during create.
mInput = ain;
setVar(1, ain);
|
public void | setRadius(float radius)Set the radius of the Blur.
Supported range 0 < radius <= 25
if (radius <= 0 || radius > 25) {
throw new RSIllegalArgumentException("Radius out of range (0 < r <= 25).");
}
setVar(0, radius);
|