Android.Renderscripts.Element Class

Developer Guides

See Also: Element Members

Syntax

[Android.Runtime.Register("android/renderscript/Element", DoNotGenerateAcw=true)]
public class Element : BaseObj

Remarks

Developer Guides

An Element represents one item within an Android.Renderscripts.Allocation. An Element is roughly equivalent to a C type in a RenderScript kernel. Elements may be basic or complex. Some basic elements are

A complex element is roughly equivalent to a C struct and contains a number of basic or complex Elements. From Java code, a complex element contains a list of sub-elements and names that represents a particular data structure. Structs used in RS scripts are available to Java code by using the ScriptField_structname class that is reflected from a particular script.

Basic Elements are comprised of a NoType:android/renderscript/Element$DataType;Href=../../../reference/android/renderscript/Element.DataType.html and a NoType:android/renderscript/Element$DataKind;Href=../../../reference/android/renderscript/Element.DataKind.html. The DataType encodes C type information of an Element, while the DataKind encodes how that Element should be interpreted by a Android.Renderscripts.Sampler. Note that Android.Renderscripts.Allocation objects with DataKind NoType:android/renderscript/Element$DataKind;Href=../../../reference/android/renderscript/Element.DataKind.html#USER cannot be used as input for a Android.Renderscripts.Sampler. In general, Android.Renderscripts.Allocation objects that are intended for use with a Android.Renderscripts.Sampler should use bitmap-derived Elements such as Element.RGBA_8888(RenderScript) or Android.Renderscript.

For more information about creating an application that uses RenderScript, read the RenderScript developer guide.

[Android Documentation]

Requirements

Namespace: Android.Renderscripts
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11