public final class ScriptIntrinsicBlur
extends ScriptIntrinsic
| java.lang.Object | ||||
| android.renderscript.BaseObj | ||||
| android.renderscript.Script | ||||
| android.renderscript.ScriptIntrinsic | ||||
| android.renderscript.ScriptIntrinsicBlur | ||||
固有的高斯模糊过滤器。 将指定半径的高斯模糊应用于分配的所有元素。
公共方法(Public methods) |
|
|---|---|
static ScriptIntrinsicBlur |
create(RenderScript rs, Element e) 为分配应用模糊创建一个内在属性。 |
void |
forEach(Allocation aout) 将过滤器应用于输入并保存到指定的分配。 |
void |
forEach(Allocation aout, Script.LaunchOptions opt) 将过滤器应用于输入并保存到指定的分配。 |
Script.FieldID |
getFieldID_Input() 获取此内在的输入字段的FieldID。 |
Script.KernelID |
getKernelID() 为此内核获取KernelID。 |
void |
setInput(Allocation ain) 设置模糊的输入。 |
void |
setRadius(float radius) 设置模糊的半径。 |
继承方法(Inherited methods) |
|
|---|---|
android.renderscript.Script
|
|
android.renderscript.BaseObj
|
|
java.lang.Object
|
|
ScriptIntrinsicBlur create (RenderScript rs, Element e)
为分配应用模糊创建一个内在属性。 默认半径是5.0。 支持的元素类型是U8(RenderScript) , U8_4(RenderScript) 。
| 参数(Parameters) | |
|---|---|
rs |
RenderScript: The RenderScript context |
e |
Element: Element type for inputs and outputs |
| 返回(Returns) | |
|---|---|
ScriptIntrinsicBlur |
ScriptIntrinsicBlur |
void forEach (Allocation aout)
将过滤器应用于输入并保存到指定的分配。
| 参数(Parameters) | |
|---|---|
aout |
Allocation: Output allocation. Must match creation element type. |
void forEach (Allocation aout, Script.LaunchOptions opt)
将过滤器应用于输入并保存到指定的分配。
| 参数(Parameters) | |
|---|---|
aout |
Allocation: Output allocation. Must match creation element type. |
opt |
Script.LaunchOptions: LaunchOptions for clipping |
Script.FieldID getFieldID_Input ()
获取此内在的输入字段的FieldID。
| 返回(Returns) | |
|---|---|
Script.FieldID |
Script.FieldID The FieldID object. |
Script.KernelID getKernelID ()
为此内核获取KernelID。
| 返回(Returns) | |
|---|---|
Script.KernelID |
Script.KernelID The KernelID object. |
void setInput (Allocation ain)
设置模糊的输入。 必须与创建期间提供的元素类型相匹配。
| 参数(Parameters) | |
|---|---|
ain |
Allocation: The input allocation |
void setRadius (float radius)
设置模糊的半径。 支持的范围0 <半径<= 25
| 参数(Parameters) | |
|---|---|
radius |
float: The radius of the blur |