ScriptIntrinsicBlend
open class ScriptIntrinsicBlend : ScriptIntrinsic
| kotlin.Any | ||||
| ↳ | android.renderscript.BaseObj | |||
| ↳ | android.renderscript.Script | |||
| ↳ | android.renderscript.ScriptIntrinsic | |||
| ↳ | android.renderscript.ScriptIntrinsicBlend | |||
Intrinsic kernels for blending two android.renderscript.Allocation objects.
Summary
| Public methods | |
|---|---|
| open static ScriptIntrinsicBlend! |
create(rs: RenderScript!, e: Element!)Supported elements types are |
| open Unit |
forEachAdd(ain: Allocation!, aout: Allocation!)Sets dst = min(src + dst, 1.0) |
| open Unit |
forEachAdd(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = min(src + dst, 1.0) |
| open Unit |
forEachClear(ain: Allocation!, aout: Allocation!)Sets dst = {0, 0, 0, 0} |
| open Unit |
forEachClear(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = {0, 0, 0, 0} |
| open Unit |
forEachDst(ain: Allocation!, aout: Allocation!)Sets dst = dst This is a NOP. |
| open Unit |
forEachDst(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = dst This is a NOP. |
| open Unit |
forEachDstAtop(ain: Allocation!, aout: Allocation!)dst = dst. |
| open Unit |
forEachDstAtop(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)dst = dst. |
| open Unit |
forEachDstIn(ain: Allocation!, aout: Allocation!)Sets dst = dst * src. |
| open Unit |
forEachDstIn(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = dst * src. |
| open Unit |
forEachDstOut(ain: Allocation!, aout: Allocation!)Sets dst = dst * (1.0 - src.a) |
| open Unit |
forEachDstOut(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = dst * (1.0 - src.a) |
| open Unit |
forEachDstOver(ain: Allocation!, aout: Allocation!)Sets dst = dst + src * (1.0 - dst.a) |
| open Unit |
forEachDstOver(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = dst + src * (1.0 - dst.a) |
| open Unit |
forEachMultiply(ain: Allocation!, aout: Allocation!)Sets dst = src * dst |
| open Unit |
forEachMultiply(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = src * dst |
| open Unit |
forEachSrc(ain: Allocation!, aout: Allocation!)Sets dst = src |
| open Unit |
forEachSrc(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = src |
| open Unit |
forEachSrcAtop(ain: Allocation!, aout: Allocation!)dst. |
| open Unit |
forEachSrcAtop(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)dst. |
| open Unit |
forEachSrcIn(ain: Allocation!, aout: Allocation!)Sets dst = src * dst. |
| open Unit |
forEachSrcIn(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = src * dst. |
| open Unit |
forEachSrcOut(ain: Allocation!, aout: Allocation!)Sets dst = src * (1.0 - dst.a) |
| open Unit |
forEachSrcOut(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = src * (1.0 - dst.a) |
| open Unit |
forEachSrcOver(ain: Allocation!, aout: Allocation!)Sets dst = src + dst * (1.0 - src.a) |
| open Unit |
forEachSrcOver(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = src + dst * (1.0 - src.a) |
| open Unit |
forEachSubtract(ain: Allocation!, aout: Allocation!)Sets dst = max(dst - src, 0.0) |
| open Unit |
forEachSubtract(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = max(dst - src, 0.0) |
| open Unit |
forEachXor(ain: Allocation!, aout: Allocation!)Sets dst = {src. |
| open Unit |
forEachXor(ain: Allocation!, aout: Allocation!, opt: Script.LaunchOptions!)Sets dst = {src. |
| open Script.KernelID! |
Get a KernelID for the Add kernel. |
| open Script.KernelID! |
Get a KernelID for the Clear kernel. |
| open Script.KernelID! |
Get a KernelID for the Dst kernel. |
| open Script.KernelID! |
Get a KernelID for the DstAtop kernel. |
| open Script.KernelID! |
Get a KernelID for the DstIn kernel. |
| open Script.KernelID! |
Get a KernelID for the DstOut kernel. |
| open Script.KernelID! |
Get a KernelID for the DstOver kernel. |
| open Script.KernelID! |
Get a KernelID for the Multiply kernel. |
| open Script.KernelID! |
Get a KernelID for the Src kernel. |
| open Script.KernelID! |
Get a KernelID for the SrcAtop kernel. |
| open Script.KernelID! |
Get a KernelID for the SrcIn kernel. |
| open Script.KernelID! |
Get a KernelID for the SrcOut kernel. |
| open Script.KernelID! |
Get a KernelID for the SrcOver kernel. |
| open Script.KernelID! |
Get a KernelID for the Subtract kernel. |
| open Script.KernelID! |
Get a KernelID for the Xor kernel. |
Public methods
create
open static fun create(
rs: RenderScript!,
e: Element!
): ScriptIntrinsicBlend!
Supported elements types are Element#U8_4
| Parameters | |
|---|---|
rs |
RenderScript!: The RenderScript context |
e |
Element!: Element type for inputs and outputs |
| Return | |
|---|---|
ScriptIntrinsicBlend! |
ScriptIntrinsicBlend |
forEachAdd
open fun forEachAdd(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = min(src + dst, 1.0)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachAdd
open fun forEachAdd(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = min(src + dst, 1.0)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachClear
open fun forEachClear(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = {0, 0, 0, 0}
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachClear
open fun forEachClear(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = {0, 0, 0, 0}
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachDst
open fun forEachDst(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = dst This is a NOP.
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachDst
open fun forEachDst(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = dst This is a NOP.
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachDstAtop
open fun forEachDstAtop(
ain: Allocation!,
aout: Allocation!
): Unit
dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb dst.a = src.a Note: Before API 23, the alpha channel was not correctly set. Please use with caution when targeting older APIs.
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachDstAtop
open fun forEachDstAtop(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb dst.a = src.a Note: Before API 23, the alpha channel was not correctly set. Please use with caution when targeting older APIs.
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachDstIn
open fun forEachDstIn(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = dst * src.a
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachDstIn
open fun forEachDstIn(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = dst * src.a
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachDstOut
open fun forEachDstOut(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = dst * (1.0 - src.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachDstOut
open fun forEachDstOut(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = dst * (1.0 - src.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachDstOver
open fun forEachDstOver(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = dst + src * (1.0 - dst.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachDstOver
open fun forEachDstOver(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets 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
open fun forEachMultiply(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = src * dst
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachMultiply
open fun forEachMultiply(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = src * dst
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachSrc
open fun forEachSrc(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = src
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachSrc
open fun forEachSrc(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = src
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachSrcAtop
open fun forEachSrcAtop(
ain: Allocation!,
aout: Allocation!
): Unit
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
open fun forEachSrcAtop(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
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
open fun forEachSrcIn(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = src * dst.a
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachSrcIn
open fun forEachSrcIn(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = src * dst.a
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachSrcOut
open fun forEachSrcOut(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = src * (1.0 - dst.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachSrcOut
open fun forEachSrcOut(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = src * (1.0 - dst.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachSrcOver
open fun forEachSrcOver(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = src + dst * (1.0 - src.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachSrcOver
open fun forEachSrcOver(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = src + dst * (1.0 - src.a)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachSubtract
open fun forEachSubtract(
ain: Allocation!,
aout: Allocation!
): Unit
Sets dst = max(dst - src, 0.0)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
forEachSubtract
open fun forEachSubtract(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = max(dst - src, 0.0)
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
forEachXor
open fun forEachXor(
ain: Allocation!,
aout: Allocation!
): Unit
Sets 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
open fun forEachXor(
ain: Allocation!,
aout: Allocation!,
opt: Script.LaunchOptions!
): Unit
Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a} Note: this is NOT the Porter/Duff XOR mode; this is a bitwise xor.
| Parameters | |
|---|---|
ain |
Allocation!: The source buffer |
aout |
Allocation!: The destination buffer |
opt |
Script.LaunchOptions!: LaunchOptions for clipping |
getKernelIDAdd
open fun getKernelIDAdd(): Script.KernelID!
Get a KernelID for the Add kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDClear
open fun getKernelIDClear(): Script.KernelID!
Get a KernelID for the Clear kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDDst
open fun getKernelIDDst(): Script.KernelID!
Get a KernelID for the Dst kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDDstAtop
open fun getKernelIDDstAtop(): Script.KernelID!
Get a KernelID for the DstAtop kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDDstIn
open fun getKernelIDDstIn(): Script.KernelID!
Get a KernelID for the DstIn kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDDstOut
open fun getKernelIDDstOut(): Script.KernelID!
Get a KernelID for the DstOut kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDDstOver
open fun getKernelIDDstOver(): Script.KernelID!
Get a KernelID for the DstOver kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDMultiply
open fun getKernelIDMultiply(): Script.KernelID!
Get a KernelID for the Multiply kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDSrc
open fun getKernelIDSrc(): Script.KernelID!
Get a KernelID for the Src kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDSrcAtop
open fun getKernelIDSrcAtop(): Script.KernelID!
Get a KernelID for the SrcAtop kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDSrcIn
open fun getKernelIDSrcIn(): Script.KernelID!
Get a KernelID for the SrcIn kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDSrcOut
open fun getKernelIDSrcOut(): Script.KernelID!
Get a KernelID for the SrcOut kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDSrcOver
open fun getKernelIDSrcOver(): Script.KernelID!
Get a KernelID for the SrcOver kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDSubtract
open fun getKernelIDSubtract(): Script.KernelID!
Get a KernelID for the Subtract kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |
getKernelIDXor
open fun getKernelIDXor(): Script.KernelID!
Get a KernelID for the Xor kernel.
| Return | |
|---|---|
Script.KernelID! |
Script.KernelID The KernelID object. |

