Most visited

Recently visited

Added in API level 17

ScriptIntrinsicBlend

public class ScriptIntrinsicBlend
extends ScriptIntrinsic

java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Script
       ↳ android.renderscript.ScriptIntrinsic
         ↳ android.renderscript.ScriptIntrinsicBlend


用于混合两个 Allocation对象的内核。

Summary

Public methods

static ScriptIntrinsicBlend create(RenderScript rs, Element e)

支持的元素类型是 U8_4(RenderScript)

void forEachAdd(Allocation ain, Allocation aout)

设置dst = min(src + dst,1.0)

void forEachAdd(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = min(src + dst,1.0)

void forEachClear(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = {0,0,0,0}

void forEachClear(Allocation ain, Allocation aout)

设置dst = {0,0,0,0}

void forEachDst(Allocation ain, Allocation aout)

设置dst = dst这是一个NOP。

void forEachDst(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = dst这是一个NOP。

void forEachDstAtop(Allocation ain, Allocation aout, Script.LaunchOptions opt)

dst = dst.rgb * src.a +(1.0 - dst.a)* src.rgb dst.a = src.a注意:在API 23之前,Alpha通道未正确设置。

void forEachDstAtop(Allocation ain, Allocation aout)

dst = dst.rgb * src.a +(1.0 - dst.a)* src.rgb dst.a = src.a注意:在API 23之前,Alpha通道未正确设置。

void forEachDstIn(Allocation ain, Allocation aout)

设置dst = dst * src.a

void forEachDstIn(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = dst * src.a

void forEachDstOut(Allocation ain, Allocation aout)

设置dst = dst *(1.0 - src.a)

void forEachDstOut(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = dst *(1.0 - src.a)

void forEachDstOver(Allocation ain, Allocation aout)

设置dst = dst + src *(1.0 - dst.a)

void forEachDstOver(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = dst + src *(1.0 - dst.a)

void forEachMultiply(Allocation ain, Allocation aout)

设置dst = src * dst

void forEachMultiply(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = src * dst

void forEachSrc(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = src

void forEachSrc(Allocation ain, Allocation aout)

设置dst = src

void forEachSrcAtop(Allocation ain, Allocation aout)

dst.rgb = src.rgb * dst.a +(1.0 - src.a)* dst.rgb dst.a = dst.a

void forEachSrcAtop(Allocation ain, Allocation aout, Script.LaunchOptions opt)

dst.rgb = src.rgb * dst.a +(1.0 - src.a)* dst.rgb dst.a = dst.a

void forEachSrcIn(Allocation ain, Allocation aout)

设置dst = src * dst.a

void forEachSrcIn(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = src * dst.a

void forEachSrcOut(Allocation ain, Allocation aout)

设置dst = src *(1.0 - dst.a)

void forEachSrcOut(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = src *(1.0 - dst.a)

void forEachSrcOver(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = src + dst *(1.0 - src.a)

void forEachSrcOver(Allocation ain, Allocation aout)

设置dst = src + dst *(1.0 - src.a)

void forEachSubtract(Allocation ain, Allocation aout)

设置dst = max(dst - src,0.0)

void forEachSubtract(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = max(dst - src,0.0)

void forEachXor(Allocation ain, Allocation aout)

设置dst = {src.r ^ dst.r,src.g ^ dst.g,src.b ^ dst.b,src.a ^ dst.a}

void forEachXor(Allocation ain, Allocation aout, Script.LaunchOptions opt)

设置dst = {src.r ^ dst.r,src.g ^ dst.g,src.b ^ dst.b,src.a ^ dst.a} 注意:这不是Porter / Duff异或模式; 这是一个按位异或。

Script.KernelID getKernelIDAdd()

为添加内核获取KernelID。

Script.KernelID getKernelIDClear()

获取Clear内核的KernelID。

Script.KernelID getKernelIDDst()

获取Dst内核的KernelID。

Script.KernelID getKernelIDDstAtop()

获取DstAtop内核的KernelID。

Script.KernelID getKernelIDDstIn()

获取DstIn内核的KernelID。

Script.KernelID getKernelIDDstOut()

获取DstOut内核的KernelID。

Script.KernelID getKernelIDDstOver()

获取DstOver内核的KernelID。

Script.KernelID getKernelIDMultiply()

获取Multiply内核的KernelID。

Script.KernelID getKernelIDSrc()

获取Src内核的KernelID。

Script.KernelID getKernelIDSrcAtop()

获取SrcAtop内核的KernelID。

Script.KernelID getKernelIDSrcIn()

获取SrcIn内核的KernelID。

Script.KernelID getKernelIDSrcOut()

获取SrcOut内核的KernelID。

Script.KernelID getKernelIDSrcOver()

获取SrcOver内核的KernelID。

Script.KernelID getKernelIDSubtract()

获取Subtract内核的KernelID。

Script.KernelID getKernelIDXor()

获取Xor内核的KernelID。

Inherited methods

From class android.renderscript.Script
From class android.renderscript.BaseObj
From class java.lang.Object

Public methods

create

Added in API level 17
ScriptIntrinsicBlend create (RenderScript rs, 
                Element e)

支持的元素类型是 U8_4(RenderScript)

Parameters
rs RenderScript: The RenderScript context
e Element: Element type for inputs and outputs
Returns
ScriptIntrinsicBlend ScriptIntrinsicBlend

forEachAdd

Added in API level 17
void forEachAdd (Allocation ain, 
                Allocation aout)

设置dst = min(src + dst,1.0)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachAdd

Added in API level 21
void forEachAdd (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = min(src + dst,1.0)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachClear

Added in API level 21
void forEachClear (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = {0,0,0,0}

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachClear

Added in API level 17
void forEachClear (Allocation ain, 
                Allocation aout)

设置dst = {0,0,0,0}

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachDst

Added in API level 17
void forEachDst (Allocation ain, 
                Allocation aout)

设置dst = dst这是一个NOP。

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachDst

Added in API level 21
void forEachDst (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = dst这是一个NOP。

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachDstAtop

Added in API level 21
void forEachDstAtop (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

dst = dst.rgb * src.a +(1.0 - dst.a)* src.rgb dst.a = src.a注意:在API 23之前,Alpha通道未正确设置。 定位旧版API时请谨慎使用。

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachDstAtop

Added in API level 17
void forEachDstAtop (Allocation ain, 
                Allocation aout)

dst = dst.rgb * src.a +(1.0 - dst.a)* src.rgb dst.a = src.a注意:在API 23之前,Alpha通道未正确设置。 定位旧版API时请谨慎使用。

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachDstIn

Added in API level 17
void forEachDstIn (Allocation ain, 
                Allocation aout)

设置dst = dst * src.a

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachDstIn

Added in API level 21
void forEachDstIn (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = dst * src.a

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachDstOut

Added in API level 17
void forEachDstOut (Allocation ain, 
                Allocation aout)

设置dst = dst *(1.0 - src.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachDstOut

Added in API level 21
void forEachDstOut (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = dst *(1.0 - src.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachDstOver

Added in API level 17
void forEachDstOver (Allocation ain, 
                Allocation aout)

设置dst = dst + src *(1.0 - dst.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachDstOver

Added in API level 21
void forEachDstOver (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = dst + src *(1.0 - dst.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachMultiply

Added in API level 17
void forEachMultiply (Allocation ain, 
                Allocation aout)

设置dst = src * dst

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachMultiply

Added in API level 21
void forEachMultiply (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = src * dst

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachSrc

Added in API level 21
void forEachSrc (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = src

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachSrc

Added in API level 17
void forEachSrc (Allocation ain, 
                Allocation aout)

设置dst = src

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachSrcAtop

Added in API level 17
void forEachSrcAtop (Allocation ain, 
                Allocation aout)

dst.rgb = src.rgb * dst.a +(1.0 - src.a)* dst.rgb dst.a = dst.a

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachSrcAtop

Added in API level 21
void forEachSrcAtop (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

dst.rgb = src.rgb * dst.a +(1.0 - src.a)* dst.rgb dst.a = dst.a

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachSrcIn

Added in API level 17
void forEachSrcIn (Allocation ain, 
                Allocation aout)

设置dst = src * dst.a

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachSrcIn

Added in API level 21
void forEachSrcIn (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = src * dst.a

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachSrcOut

Added in API level 17
void forEachSrcOut (Allocation ain, 
                Allocation aout)

设置dst = src *(1.0 - dst.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachSrcOut

Added in API level 21
void forEachSrcOut (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = src *(1.0 - dst.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachSrcOver

Added in API level 21
void forEachSrcOver (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = src + dst *(1.0 - src.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachSrcOver

Added in API level 17
void forEachSrcOver (Allocation ain, 
                Allocation aout)

设置dst = src + dst *(1.0 - src.a)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachSubtract

Added in API level 17
void forEachSubtract (Allocation ain, 
                Allocation aout)

设置dst = max(dst - src,0.0)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachSubtract

Added in API level 21
void forEachSubtract (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = max(dst - src,0.0)

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

forEachXor

Added in API level 17
void forEachXor (Allocation ain, 
                Allocation aout)

设置dst = {src.r ^ dst.r,src.g ^ dst.g,src.b ^ dst.b,src.a ^ dst.a}

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer

forEachXor

Added in API level 21
void forEachXor (Allocation ain, 
                Allocation aout, 
                Script.LaunchOptions opt)

设置dst = {src.r ^ dst.r,src.g ^ dst.g,src.b ^ dst.b,src.a ^ dst.a} 注意:这不是Porter / Duff异或模式; 这是一个按位异或。

Parameters
ain Allocation: The source buffer
aout Allocation: The destination buffer
opt Script.LaunchOptions: LaunchOptions for clipping

getKernelIDAdd

Added in API level 17
Script.KernelID getKernelIDAdd ()

为添加内核获取KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDClear

Added in API level 17
Script.KernelID getKernelIDClear ()

获取Clear内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDst

Added in API level 17
Script.KernelID getKernelIDDst ()

获取Dst内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstAtop

Added in API level 17
Script.KernelID getKernelIDDstAtop ()

获取DstAtop内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstIn

Added in API level 17
Script.KernelID getKernelIDDstIn ()

获取DstIn内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstOut

Added in API level 17
Script.KernelID getKernelIDDstOut ()

获取DstOut内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstOver

Added in API level 17
Script.KernelID getKernelIDDstOver ()

获取DstOver内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDMultiply

Added in API level 17
Script.KernelID getKernelIDMultiply ()

获取Multiply内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrc

Added in API level 17
Script.KernelID getKernelIDSrc ()

获取Src内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcAtop

Added in API level 17
Script.KernelID getKernelIDSrcAtop ()

获取SrcAtop内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcIn

Added in API level 17
Script.KernelID getKernelIDSrcIn ()

获取SrcIn内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcOut

Added in API level 17
Script.KernelID getKernelIDSrcOut ()

获取SrcOut内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcOver

Added in API level 17
Script.KernelID getKernelIDSrcOver ()

获取SrcOver内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSubtract

Added in API level 17
Script.KernelID getKernelIDSubtract ()

获取Subtract内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDXor

Added in API level 17
Script.KernelID getKernelIDXor ()

获取Xor内核的KernelID。

Returns
Script.KernelID Script.KernelID The KernelID object.

Hooray!