Added in API level 11
Deprecated in API level 31

Type


open class Type : BaseObj
kotlin.Any
   ↳ android.renderscript.BaseObj
   ↳ android.renderscript.Type

A Type describes the android.renderscript.Element and dimensions used for an or a parallel operation. Types are created through .

A Type always includes an android.renderscript.Element and an X dimension. A Type may be multidimensional, up to three dimensions. A nonzero value in the Y or Z dimensions indicates that the dimension is present. Note that a Type with only a given X dimension and a Type with the same X dimension but Y = 1 are not equivalent.

A Type also supports inclusion of level of detail (LOD) or cube map faces. LOD and cube map faces are booleans to indicate present or not present.

A Type also supports YUV format information to support an android.renderscript.Allocation in a YUV format. The YUV formats supported are android.graphics.ImageFormat#YV12, android.graphics.ImageFormat#NV21, and android.graphics.ImageFormat#YUV_420_888

Summary

Nested classes
open

Builder class for Type.

Public methods
open static Type!
createX(rs: RenderScript!, e: Element!, dimX: Int)

Utility function for creating basic 1D types.

open static Type!
createXY(rs: RenderScript!, e: Element!, dimX: Int, dimY: Int)

Utility function for creating basic 2D types.

open static Type!
createXYZ(rs: RenderScript!, e: Element!, dimX: Int, dimY: Int, dimZ: Int)

Utility function for creating basic 3D types.

open Int

Return the total number of accessable cells in the Type.

open Element!

Return the element associated with this Type.

open Int

Return the value of the X dimension.

open Int

Return the value of the Y dimension or 0 for a 1D allocation.

open Int

Get the YUV format

open Int

Return the value of the Z dimension or 0 for a 1D or 2D allocation.

open Boolean

Return if the Type is a cube map.

open Boolean

Return if the Type has a mipmap chain.

Inherited functions

Public methods

createX

Added in API level 21
Deprecated in API level 31
open static fun createX(
    rs: RenderScript!,
    e: Element!,
    dimX: Int
): Type!

Deprecated: Deprecated in Java.

Utility function for creating basic 1D types. The type is created without mipmaps enabled.

Parameters
rs RenderScript!: The RenderScript context
e Element!: The Element for the Type
dimX Int: The X dimension, must be > 0
Return
Type! Type

createXY

Added in API level 21
Deprecated in API level 31
open static fun createXY(
    rs: RenderScript!,
    e: Element!,
    dimX: Int,
    dimY: Int
): Type!

Deprecated: Deprecated in Java.

Utility function for creating basic 2D types. The type is created without mipmaps or cubemaps.

Parameters
rs RenderScript!: The RenderScript context
e Element!: The Element for the Type
dimX Int: The X dimension, must be > 0
dimY Int: The Y dimension, must be > 0
Return
Type! Type

createXYZ

Added in API level 21
Deprecated in API level 31
open static fun createXYZ(
    rs: RenderScript!,
    e: Element!,
    dimX: Int,
    dimY: Int,
    dimZ: Int
): Type!

Deprecated: Deprecated in Java.

Utility function for creating basic 3D types. The type is created without mipmaps.

Parameters
rs RenderScript!: The RenderScript context
e Element!: The Element for the Type
dimX Int: The X dimension, must be > 0
dimY Int: The Y dimension, must be > 0
dimZ Int: The Z dimension, must be > 0
Return
Type! Type

getCount

Added in API level 11
open fun getCount(): Int

Deprecated: Deprecated in Java.

Return the total number of accessable cells in the Type.

Return
Int int

getElement

Added in API level 11
open fun getElement(): Element!

Deprecated: Deprecated in Java.

Return the element associated with this Type.

Return
Element! Element

getX

Added in API level 11
open fun getX(): Int

Deprecated: Deprecated in Java.

Return the value of the X dimension.

Return
Int int

getY

Added in API level 11
open fun getY(): Int

Deprecated: Deprecated in Java.

Return the value of the Y dimension or 0 for a 1D allocation.

Return
Int int

getYuv

Added in API level 18
Deprecated in API level 31
open fun getYuv(): Int

Deprecated: Deprecated in Java.

Get the YUV format

Return
Int int

getZ

Added in API level 11
open fun getZ(): Int

Deprecated: Deprecated in Java.

Return the value of the Z dimension or 0 for a 1D or 2D allocation.

Return
Int int

hasFaces

Added in API level 11
open fun hasFaces(): Boolean

Deprecated: Deprecated in Java.

Return if the Type is a cube map.

Return
Boolean boolean

hasMipmaps

Added in API level 11
open fun hasMipmaps(): Boolean

Deprecated: Deprecated in Java.

Return if the Type has a mipmap chain.

Return
Boolean boolean