# ScriptIntrinsicBlend

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#inhmethods)  

# ScriptIntrinsicBlend

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/renderscript/ScriptIntrinsicBlend "View this page in Kotlin")\|Java

`
public


class
ScriptIntrinsicBlend
`  
`


``


``


``

extends `[ScriptIntrinsic](https://developer.android.com/reference/android/renderscript/ScriptIntrinsic)`


``


`

|---|---|---|---|-------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||||
| ↳ | [android.renderscript.BaseObj](https://developer.android.com/reference/android/renderscript/BaseObj) ||||
|   | ↳ | [android.renderscript.Script](https://developer.android.com/reference/android/renderscript/Script) |||
|   |   | ↳ | [android.renderscript.ScriptIntrinsic](https://developer.android.com/reference/android/renderscript/ScriptIntrinsic) ||
|   |   |   | ↳ | android.renderscript.ScriptIntrinsicBlend |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 31.**   
Renderscript has been deprecated in API level 31. Please refer to the[migration guide](https://developer.android.com/guide/topics/renderscript/migration-guide)for the proposed alternatives.

Intrinsic kernels for blending two[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)objects.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                  ||
|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[ScriptIntrinsicBlend](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend) | ` `[create](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#create(android.renderscript.RenderScript,%20android.renderscript.Element))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Element](https://developer.android.com/reference/android/renderscript/Element)` e) ` Supported elements types are[Element.U8_4](https://developer.android.com/reference/android/renderscript/Element#U8_4(android.renderscript.RenderScript))                                                                                                                                                                      |
| ` void`                                                                                                             | ` `[forEachAdd](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachAdd(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = min(src + dst, 1.0)                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                             | ` `[forEachAdd](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachAdd(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = min(src + dst, 1.0)                                                                                                                   |
| ` void`                                                                                                             | ` `[forEachClear](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachClear(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = {0, 0, 0, 0}                                                                                                                      |
| ` void`                                                                                                             | ` `[forEachClear](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachClear(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = {0, 0, 0, 0}                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                             | ` `[forEachDst](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDst(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = dst This is a NOP.                                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                             | ` `[forEachDst](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDst(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = dst This is a NOP.                                                                                                                    |
| ` void`                                                                                                             | ` `[forEachDstAtop](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstAtop(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` 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.            |
| ` void`                                                                                                             | ` `[forEachDstAtop](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstAtop(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` 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.                                                                                                                                                                          |
| ` void`                                                                                                             | ` `[forEachDstIn](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstIn(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = dst \* src.a                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                             | ` `[forEachDstIn](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstIn(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = dst \* src.a                                                                                                                      |
| ` void`                                                                                                             | ` `[forEachDstOut](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstOut(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = dst \* (1.0 - src.a)                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                             | ` `[forEachDstOut](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstOut(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = dst \* (1.0 - src.a)                                                                                                            |
| ` void`                                                                                                             | ` `[forEachDstOver](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstOver(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = dst + src \* (1.0 - dst.a)                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                             | ` `[forEachDstOver](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachDstOver(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = dst + src \* (1.0 - dst.a)                                                                                                    |
| ` void`                                                                                                             | ` `[forEachMultiply](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachMultiply(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = src \* dst                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                             | ` `[forEachMultiply](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachMultiply(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = src \* dst                                                                                                                  |
| ` void`                                                                                                             | ` `[forEachSrc](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrc(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = src                                                                                                                                   |
| ` void`                                                                                                             | ` `[forEachSrc](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrc(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = src                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                             | ` `[forEachSrcAtop](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcAtop(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` dst.rgb = src.rgb \* dst.a + (1.0 - src.a) \* dst.rgb dst.a = dst.a                                                                                                                                                                                                                                    |
| ` void`                                                                                                             | ` `[forEachSrcAtop](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcAtop(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` dst.rgb = src.rgb \* dst.a + (1.0 - src.a) \* dst.rgb dst.a = dst.a                                                                      |
| ` void`                                                                                                             | ` `[forEachSrcIn](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcIn(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = src \* dst.a                                                                                                                                                                                                                                                                                    |
| ` void`                                                                                                             | ` `[forEachSrcIn](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcIn(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = src \* dst.a                                                                                                                      |
| ` void`                                                                                                             | ` `[forEachSrcOut](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcOut(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = src \* (1.0 - dst.a)                                                                                                                                                                                                                                                                          |
| ` void`                                                                                                             | ` `[forEachSrcOut](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcOut(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = src \* (1.0 - dst.a)                                                                                                            |
| ` void`                                                                                                             | ` `[forEachSrcOver](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcOver(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = src + dst \* (1.0 - src.a)                                                                                                    |
| ` void`                                                                                                             | ` `[forEachSrcOver](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSrcOver(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = src + dst \* (1.0 - src.a)                                                                                                                                                                                                                                                                  |
| ` void`                                                                                                             | ` `[forEachSubtract](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSubtract(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = max(dst - src, 0.0)                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                             | ` `[forEachSubtract](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachSubtract(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` Sets dst = max(dst - src, 0.0)                                                                                                         |
| ` void`                                                                                                             | ` `[forEachXor](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachXor(android.renderscript.Allocation,%20android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout) ` Sets dst = {src.r \^ dst.r, src.g \^ dst.g, src.b \^ dst.b, src.a \^ dst.a}                                                                                                                                                                                                                                    |
| ` void`                                                                                                             | ` `[forEachXor](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#forEachXor(android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` opt) ` 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. |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDAdd](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDAdd())`() ` Get a KernelID for the Add kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDClear](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDClear())`() ` Get a KernelID for the Clear kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDDst](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDDst())`() ` Get a KernelID for the Dst kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDDstAtop](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDDstAtop())`() ` Get a KernelID for the DstAtop kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDDstIn](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDDstIn())`() ` Get a KernelID for the DstIn kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDDstOut](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDDstOut())`() ` Get a KernelID for the DstOut kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDDstOver](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDDstOver())`() ` Get a KernelID for the DstOver kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDMultiply](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDMultiply())`() ` Get a KernelID for the Multiply kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDSrc](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDSrc())`() ` Get a KernelID for the Src kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDSrcAtop](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDSrcAtop())`() ` Get a KernelID for the SrcAtop kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDSrcIn](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDSrcIn())`() ` Get a KernelID for the SrcIn kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDSrcOut](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDSrcOut())`() ` Get a KernelID for the SrcOut kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDSrcOver](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDSrcOver())`() ` Get a KernelID for the SrcOver kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDSubtract](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDSubtract())`() ` Get a KernelID for the Subtract kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID)                  | ` `[getKernelIDXor](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend#getKernelIDXor())`() ` Get a KernelID for the Xor kernel.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.renderscript.Script](https://developer.android.com/reference/android/renderscript/Script)` ` |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                            | ` `[bindAllocation](https://developer.android.com/reference/android/renderscript/Script#bindAllocation(android.renderscript.Allocation,%20int))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` va, int slot) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` `[Script.FieldID](https://developer.android.com/reference/android/renderscript/Script.FieldID)   | ` `[createFieldID](https://developer.android.com/reference/android/renderscript/Script#createFieldID(int,%20android.renderscript.Element))`(int slot, `[Element](https://developer.android.com/reference/android/renderscript/Element)` e) ` Only to be used by generated reflected classes.                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` `[Script.InvokeID](https://developer.android.com/reference/android/renderscript/Script.InvokeID) | ` `[createInvokeID](https://developer.android.com/reference/android/renderscript/Script#createInvokeID(int))`(int slot) ` Only to be used by generated reflected classes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | ` `[Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | ` `[createKernelID](https://developer.android.com/reference/android/renderscript/Script#createKernelID(int,%20int,%20android.renderscript.Element,%20android.renderscript.Element))`(int slot, int sig, `[Element](https://developer.android.com/reference/android/renderscript/Element)` ein, `[Element](https://developer.android.com/reference/android/renderscript/Element)` eout) ` Only to be used by generated reflected classes.                                                                                                                                                                                                                                                                                           | | ` void`                                                                                            | ` `[forEach](https://developer.android.com/reference/android/renderscript/Script#forEach(int,%20android.renderscript.Allocation[],%20android.renderscript.Allocation,%20android.renderscript.FieldPacker))`(int slot, `[Allocation[]](https://developer.android.com/reference/android/renderscript/Allocation)` ains, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v) ` Only intended for use by generated reflected code.                                                                                                                                                              | | ` void`                                                                                            | ` `[forEach](https://developer.android.com/reference/android/renderscript/Script#forEach(int,%20android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.FieldPacker,%20android.renderscript.Script.LaunchOptions))`(int slot, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` sc) ` Only intended for use by generated reflected code.      | | ` void`                                                                                            | ` `[forEach](https://developer.android.com/reference/android/renderscript/Script#forEach(int,%20android.renderscript.Allocation,%20android.renderscript.Allocation,%20android.renderscript.FieldPacker))`(int slot, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ain, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v) ` Only intended for use by generated reflected code.                                                                                                                                                                   | | ` void`                                                                                            | ` `[forEach](https://developer.android.com/reference/android/renderscript/Script#forEach(int,%20android.renderscript.Allocation[],%20android.renderscript.Allocation,%20android.renderscript.FieldPacker,%20android.renderscript.Script.LaunchOptions))`(int slot, `[Allocation[]](https://developer.android.com/reference/android/renderscript/Allocation)` ains, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` sc) ` Only intended for use by generated reflected code. | | ` boolean`                                                                                         | ` `[getVarB](https://developer.android.com/reference/android/renderscript/Script#getVarB(int))`(int index) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` double`                                                                                          | ` `[getVarD](https://developer.android.com/reference/android/renderscript/Script#getVarD(int))`(int index) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` float`                                                                                           | ` `[getVarF](https://developer.android.com/reference/android/renderscript/Script#getVarF(int))`(int index) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` int`                                                                                             | ` `[getVarI](https://developer.android.com/reference/android/renderscript/Script#getVarI(int))`(int index) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` long`                                                                                            | ` `[getVarJ](https://developer.android.com/reference/android/renderscript/Script#getVarJ(int))`(int index) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                            | ` `[getVarV](https://developer.android.com/reference/android/renderscript/Script#getVarV(int,%20android.renderscript.FieldPacker))`(int index, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                            | ` `[invoke](https://developer.android.com/reference/android/renderscript/Script#invoke(int))`(int slot) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                            | ` `[invoke](https://developer.android.com/reference/android/renderscript/Script#invoke(int,%20android.renderscript.FieldPacker))`(int slot, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                            | ` `[reduce](https://developer.android.com/reference/android/renderscript/Script#reduce(int,%20android.renderscript.Allocation[],%20android.renderscript.Allocation,%20android.renderscript.Script.LaunchOptions))`(int slot, `[Allocation[]](https://developer.android.com/reference/android/renderscript/Allocation)` ains, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` aout, `[Script.LaunchOptions](https://developer.android.com/reference/android/renderscript/Script.LaunchOptions)` sc) ` Only intended for use by generated reflected code.                                                                                                                                    | | ` void`                                                                                            | ` `[setTimeZone](https://developer.android.com/reference/android/renderscript/Script#setTimeZone(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` timeZone) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20boolean))`(int index, boolean v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20int))`(int index, int v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20android.renderscript.FieldPacker,%20android.renderscript.Element,%20int[]))`(int index, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v, `[Element](https://developer.android.com/reference/android/renderscript/Element)` e, int[] dims) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                           | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20android.renderscript.FieldPacker))`(int index, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20float))`(int index, float v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20double))`(int index, double v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20long))`(int index, long v) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                            | ` `[setVar](https://developer.android.com/reference/android/renderscript/Script#setVar(int,%20android.renderscript.BaseObj))`(int index, `[BaseObj](https://developer.android.com/reference/android/renderscript/BaseObj)` o) ` Only intended for use by generated reflected code.                                                                                                                                                                                                                                                                                                                                                                                                                                                 | ||
| From class` `[android.renderscript.BaseObj](https://developer.android.com/reference/android/renderscript/BaseObj)` ` |-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                               | ` `[destroy](https://developer.android.com/reference/android/renderscript/BaseObj#destroy())`() ` Frees any native resources associated with this object.                                                                                              | | ` boolean`                                                            | ` `[equals](https://developer.android.com/reference/android/renderscript/BaseObj#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Compare the current BaseObj with another BaseObj for equality. | | ` void`                                                               | ` `[finalize](https://developer.android.com/reference/android/renderscript/BaseObj#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                   | | ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getName](https://developer.android.com/reference/android/renderscript/BaseObj#getName())`() `                                                                                                                                                      | | ` int`                                                                | ` `[hashCode](https://developer.android.com/reference/android/renderscript/BaseObj#hashCode())`() ` Calculates the hash code value for a BaseObj.                                                                                                      | | ` void`                                                               | ` `[setName](https://developer.android.com/reference/android/renderscript/BaseObj#setName(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` name) ` setName assigns a name to an object.                        | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public methods

### create

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static ScriptIntrinsicBlend create (RenderScript rs, 
                Element e)
```

Supported elements types are[Element.U8_4](https://developer.android.com/reference/android/renderscript/Element#U8_4(android.renderscript.RenderScript))

<br />

|                         Parameters                          ||
|------|-------------------------------------------------------|
| `rs` | `RenderScript`: The RenderScript context <br />       |
| `e`  | `Element`: Element type for inputs and outputs <br /> |

|                                                                Returns                                                                 ||
|-----------------------------------------------------------------------------------------------------------|-----------------------------|
| [ScriptIntrinsicBlend](https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlend) | ScriptIntrinsicBlend <br /> |

### forEachAdd

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachAdd (Allocation ain, 
                Allocation aout)
```

Sets dst = min(src + dst, 1.0)

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachAdd

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = min(src + dst, 1.0)

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachClear

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = {0, 0, 0, 0}

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachClear

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachClear (Allocation ain, 
                Allocation aout)
```

Sets dst = {0, 0, 0, 0}

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachDst

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachDst (Allocation ain, 
                Allocation aout)
```

Sets dst = dst This is a NOP.

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachDst

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = dst This is a NOP.

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachDstAtop

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

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.

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachDstAtop

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachDstAtop (Allocation ain, 
                Allocation aout)
```

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.

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachDstIn

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachDstIn (Allocation ain, 
                Allocation aout)
```

Sets dst = dst \* src.a

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachDstIn

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = dst \* src.a

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachDstOut

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachDstOut (Allocation ain, 
                Allocation aout)
```

Sets dst = dst \* (1.0 - src.a)

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachDstOut

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = dst \* (1.0 - src.a)

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachDstOver

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachDstOver (Allocation ain, 
                Allocation aout)
```

Sets dst = dst + src \* (1.0 - dst.a)

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachDstOver

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = dst + src \* (1.0 - dst.a)

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachMultiply

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachMultiply (Allocation ain, 
                Allocation aout)
```

Sets dst = src \* dst

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachMultiply

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = src \* dst

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachSrc

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = src

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachSrc

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachSrc (Allocation ain, 
                Allocation aout)
```

Sets dst = src

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachSrcAtop

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachSrcAtop (Allocation ain, 
                Allocation aout)
```

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

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachSrcAtop

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public 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

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachSrcIn

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachSrcIn (Allocation ain, 
                Allocation aout)
```

Sets dst = src \* dst.a

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachSrcIn

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = src \* dst.a

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachSrcOut

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachSrcOut (Allocation ain, 
                Allocation aout)
```

Sets dst = src \* (1.0 - dst.a)

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachSrcOut

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = src \* (1.0 - dst.a)

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachSrcOver

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = src + dst \* (1.0 - src.a)

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachSrcOver

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachSrcOver (Allocation ain, 
                Allocation aout)
```

Sets dst = src + dst \* (1.0 - src.a)

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachSubtract

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachSubtract (Allocation ain, 
                Allocation aout)
```

Sets dst = max(dst - src, 0.0)

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachSubtract

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

Sets dst = max(dst - src, 0.0)

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### forEachXor

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEachXor (Allocation ain, 
                Allocation aout)
```

Sets dst = {src.r \^ dst.r, src.g \^ dst.g, src.b \^ dst.b, src.a \^ dst.a}

<br />

|                     Parameters                      ||
|--------|---------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />      |
| `aout` | `Allocation`: The destination buffer <br /> |

### forEachXor

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

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

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.

<br />

|                            Parameters                             ||
|--------|-----------------------------------------------------------|
| `ain`  | `Allocation`: The source buffer <br />                    |
| `aout` | `Allocation`: The destination buffer <br />               |
| `opt`  | `Script.LaunchOptions`: LaunchOptions for clipping <br /> |

### getKernelIDAdd

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDAdd ()
```

Get a KernelID for the Add kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDClear

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDClear ()
```

Get a KernelID for the Clear kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDDst

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDDst ()
```

Get a KernelID for the Dst kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDDstAtop

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDDstAtop ()
```

Get a KernelID for the DstAtop kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDDstIn

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDDstIn ()
```

Get a KernelID for the DstIn kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDDstOut

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDDstOut ()
```

Get a KernelID for the DstOut kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDDstOver

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDDstOver ()
```

Get a KernelID for the DstOver kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDMultiply

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDMultiply ()
```

Get a KernelID for the Multiply kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDSrc

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDSrc ()
```

Get a KernelID for the Src kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDSrcAtop

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDSrcAtop ()
```

Get a KernelID for the SrcAtop kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDSrcIn

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDSrcIn ()
```

Get a KernelID for the SrcIn kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDSrcOut

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDSrcOut ()
```

Get a KernelID for the SrcOut kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDSrcOver

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDSrcOver ()
```

Get a KernelID for the SrcOver kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDSubtract

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDSubtract ()
```

Get a KernelID for the Subtract kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |

### getKernelIDXor

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Script.KernelID getKernelIDXor ()
```

Get a KernelID for the Xor kernel.

<br />

|                                                                   Returns                                                                    ||
|-------------------------------------------------------------------------------------------------|---------------------------------------------|
| [Script.KernelID](https://developer.android.com/reference/android/renderscript/Script.KernelID) | Script.KernelID The KernelID object. <br /> |