blob: 192df54af786df9584511a83fa1d1eed192a02f4 [file] [log] [blame]
page.title=RenderScript Object Characteristics Functions
@jd:body
<div class='renderscript'>
<h2>Overview</h2>
<p> The functions below can be used to query the characteristics of an Allocation, Element,
or Sampler object. These objects are created from Java. You can't create them from a
script.
</p>
<p> <h5>Allocations:</h5>
</p>
<p> Allocations are the primary method used to pass data to and from RenderScript kernels.
</p>
<p> They are a structured collection of cells that can be used to store bitmaps, textures,
arbitrary data points, etc.
</p>
<p> This collection of cells may have many dimensions (X, Y, Z, Array0, Array1, Array2, Array3),
faces (for cubemaps), and level of details (for mipmapping).
</p>
<p> See the <a href='http://developer.android.com/reference/android/renderscript/Allocation.html'>android.renderscript.Allocation</a> for details on to create Allocations.
</p>
<p> <h5>Elements:</h5>
</p>
<p> The term "element" is used a bit ambiguously in RenderScript, as both type information
for the cells of an Allocation and the instantiation of that type. For example:<ul>
<li><a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> is a handle to a type specification, and</li>
<li>In functions like <a href='rs_allocation_data.html#android_rs:rsGetElementAt'>rsGetElementAt</a>(), "element" means the instantiation of the type,
i.e. a cell of an Allocation.</li></ul>
</p>
<p> The functions below let you query the characteristics of the type specificiation.
</p>
<p> An Element can specify a simple data types as found in C, e.g. an integer, float, or
boolean. It can also specify a handle to a RenderScript object. See <a href='rs_object_types.html#android_rs:rs_data_type'>rs_data_type</a> for
a list of basic types.
</p>
<p> Elements can specify fixed size vector (of size 2, 3, or 4) versions of the basic types.
Elements can be grouped together into complex Elements, creating the equivalent of
C structure definitions.
</p>
<p> Elements can also have a kind, which is semantic information used to interpret pixel
data. See <a href='rs_object_types.html#android_rs:rs_data_kind'>rs_data_kind</a>.
</p>
<p> When creating Allocations of common elements, you can simply use one of the many predefined
Elements like <a href='http://developer.android.com/reference/android/renderscript/Element.html#F32_2(android.renderscript.RenderScript)'>F32_2</a>.
</p>
<p> To create complex Elements, use the <a href='http://developer.android.com/reference/android/renderscript/Element.Builder.html'>Element.Builder</a> Java class.
</p>
<p> <h5>Samplers:</h5>
</p>
<p> Samplers objects define how Allocations can be read as structure within a kernel.
See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>.
</p>
<h2>Summary</h2>
<table class='jd-sumtable'><tbody>
<tr><th colspan='2'>Functions</th></tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsAllocationGetDimFaces'>rsAllocationGetDimFaces</a>
</td>
<td class='jd-descrcol' width='100%'>
Presence of more than one face
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsAllocationGetDimLOD'>rsAllocationGetDimLOD</a>
</td>
<td class='jd-descrcol' width='100%'>
Presence of levels of detail
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsAllocationGetDimX'>rsAllocationGetDimX</a>
</td>
<td class='jd-descrcol' width='100%'>
Size of the X dimension
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsAllocationGetDimY'>rsAllocationGetDimY</a>
</td>
<td class='jd-descrcol' width='100%'>
Size of the Y dimension
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsAllocationGetDimZ'>rsAllocationGetDimZ</a>
</td>
<td class='jd-descrcol' width='100%'>
Size of the Z dimension
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsAllocationGetElement'>rsAllocationGetElement</a>
</td>
<td class='jd-descrcol' width='100%'>
Get the object that describes the cell of an Allocation
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsClearObject'>rsClearObject</a>
</td>
<td class='jd-descrcol' width='100%'>
Release an object
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetBytesSize'>rsElementGetBytesSize</a>
</td>
<td class='jd-descrcol' width='100%'>
Size of an Element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetDataKind'>rsElementGetDataKind</a>
</td>
<td class='jd-descrcol' width='100%'>
Kind of an Element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetDataType'>rsElementGetDataType</a>
</td>
<td class='jd-descrcol' width='100%'>
Data type of an Element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetSubElement'>rsElementGetSubElement</a>
</td>
<td class='jd-descrcol' width='100%'>
Sub-element of a complex Element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetSubElementArraySize'>rsElementGetSubElementArraySize</a>
</td>
<td class='jd-descrcol' width='100%'>
Array size of a sub-element of a complex Element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetSubElementCount'>rsElementGetSubElementCount</a>
</td>
<td class='jd-descrcol' width='100%'>
Number of sub-elements
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetSubElementName'>rsElementGetSubElementName</a>
</td>
<td class='jd-descrcol' width='100%'>
Name of a sub-element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetSubElementNameLength'>rsElementGetSubElementNameLength</a>
</td>
<td class='jd-descrcol' width='100%'>
Length of the name of a sub-element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetSubElementOffsetBytes'>rsElementGetSubElementOffsetBytes</a>
</td>
<td class='jd-descrcol' width='100%'>
Offset of the instantiated sub-element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsElementGetVectorSize'>rsElementGetVectorSize</a>
</td>
<td class='jd-descrcol' width='100%'>
Vector size of the Element
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsIsObject'>rsIsObject</a>
</td>
<td class='jd-descrcol' width='100%'>
Check for an empty handle
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsSamplerGetAnisotropy'>rsSamplerGetAnisotropy</a>
</td>
<td class='jd-descrcol' width='100%'>
Anisotropy of the Sampler
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsSamplerGetMagnification'>rsSamplerGetMagnification</a>
</td>
<td class='jd-descrcol' width='100%'>
Sampler magnification value
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsSamplerGetMinification'>rsSamplerGetMinification</a>
</td>
<td class='jd-descrcol' width='100%'>
Sampler minification value
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsSamplerGetWrapS'>rsSamplerGetWrapS</a>
</td>
<td class='jd-descrcol' width='100%'>
Sampler wrap S value
</td>
</tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsSamplerGetWrapT'>rsSamplerGetWrapT</a>
</td>
<td class='jd-descrcol' width='100%'>
Sampler wrap T value
</td>
</tr>
</tbody></table>
<table class='jd-sumtable'><tbody>
<tr><th colspan='2'>Deprecated Functions</th></tr>
<tr class='alt-color api apilevel-1'>
<td class='jd-linkcol'>
<a href='rs_object_info.html#android_rs:rsGetAllocation'>rsGetAllocation</a>
</td>
<td class='jd-descrcol' width='100%'>
<b>Deprecated</b>. Return the Allocation for a given pointer
</td>
</tr>
</tbody></table>
<h2>Functions</h2>
<a name='android_rs:rsAllocationGetDimFaces'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsAllocationGetDimFaces</span>
<span class='normal'>: Presence of more than one face</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsAllocationGetDimFaces(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Returns 1 if more than one face is present, 0 otherwise.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> If the Allocation is a cubemap, this function returns 1 if there's more than one face
present. In all other cases, it returns 0.
</p>
</div>
</div>
<a name='android_rs:rsAllocationGetDimLOD'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsAllocationGetDimLOD</span>
<span class='normal'>: Presence of levels of detail</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsAllocationGetDimLOD(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Returns 1 if more than one LOD is present, 0 otherwise.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Query an Allocation for the presence of more than one Level Of Detail. This is useful
for mipmaps.
</p>
</div>
</div>
<a name='android_rs:rsAllocationGetDimX'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsAllocationGetDimX</span>
<span class='normal'>: Size of the X dimension</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsAllocationGetDimX(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>X dimension of the Allocation.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the size of the X dimension of the Allocation.
</p>
</div>
</div>
<a name='android_rs:rsAllocationGetDimY'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsAllocationGetDimY</span>
<span class='normal'>: Size of the Y dimension</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsAllocationGetDimY(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Y dimension of the Allocation.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the size of the Y dimension of the Allocation. If the Allocation has less
than two dimensions, returns 0.
</p>
</div>
</div>
<a name='android_rs:rsAllocationGetDimZ'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsAllocationGetDimZ</span>
<span class='normal'>: Size of the Z dimension</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsAllocationGetDimZ(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Z dimension of the Allocation.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the size of the Z dimension of the Allocation. If the Allocation has less
than three dimensions, returns 0.
</p>
</div>
</div>
<a name='android_rs:rsAllocationGetElement'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsAllocationGetElement</span>
<span class='normal'>: Get the object that describes the cell of an Allocation</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> rsAllocationGetElement(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> a);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>a</th><td>Allocation to get data from.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Element describing Allocation layout.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Get the Element object describing the type, kind, and other characteristics of a cell
of an Allocation. See the rsElement* functions below.
</p>
</div>
</div>
<a name='android_rs:rsClearObject'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsClearObject</span>
<span class='normal'>: Release an object</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td>void rsClearObject(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a>* dst);
</td>
<td> </td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a>* dst);
</td>
<td> </td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_graphics.html#android_rs:rs_font'>rs_font</a>* dst);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_graphics.html#android_rs:rs_mesh'>rs_mesh</a>* dst);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_graphics.html#android_rs:rs_program_fragment'>rs_program_fragment</a>* dst);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_graphics.html#android_rs:rs_program_raster'>rs_program_raster</a>* dst);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_graphics.html#android_rs:rs_program_store'>rs_program_store</a>* dst);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_graphics.html#android_rs:rs_program_vertex'>rs_program_vertex</a>* dst);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a>* dst);
</td>
<td> </td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_object_types.html#android_rs:rs_script'>rs_script</a>* dst);
</td>
<td> </td>
</tr>
<tr>
<td>void rsClearObject(<a href='rs_object_types.html#android_rs:rs_type'>rs_type</a>* dst);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Tells the run time that this handle will no longer be used to access the the related
object. If this was the last handle to that object, resource recovery may happen.
</p>
<p> After calling this function, *dst will be set to an empty handle. See <a href='rs_object_info.html#android_rs:rsIsObject'>rsIsObject</a>().
</p>
</div>
</div>
<a name='android_rs:rsElementGetBytesSize'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetBytesSize</span>
<span class='normal'>: Size of an Element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetBytesSize(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the size in bytes that an instantiation of this Element will occupy.
</p>
</div>
</div>
<a name='android_rs:rsElementGetDataKind'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetDataKind</span>
<span class='normal'>: Kind of an Element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_data_kind'>rs_data_kind</a> rsElementGetDataKind(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the Element's data kind. This is used to interpret pixel data.
</p>
<p> See <a href='rs_object_types.html#android_rs:rs_data_kind'>rs_data_kind</a>.
</p>
</div>
</div>
<a name='android_rs:rsElementGetDataType'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetDataType</span>
<span class='normal'>: Data type of an Element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_data_type'>rs_data_type</a> rsElementGetDataType(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the Element's base data type. This can be a type similar to C/C++ (e.g.
RS_TYPE_UNSIGNED_8), a handle (e.g. RS_TYPE_ALLOCATION and RS_TYPE_ELEMENT), or a
more complex numerical type (e.g. RS_TYPE_UNSIGNED_5_6_5 and RS_TYPE_MATRIX_4X4).
See <a href='rs_object_types.html#android_rs:rs_data_type'>rs_data_type</a>.
</p>
<p> If the Element describes a vector, this function returns the data type of one of its items.
Use <a href='rs_object_info.html#android_rs:rsElementGetVectorSize'>rsElementGetVectorSize</a> to get the size of the vector.
</p>
<p> If the Element describes a structure, RS_TYPE_NONE is returned. Use the rsElementGetSub*
functions to explore this complex Element.
</p>
</div>
</div>
<a name='android_rs:rsElementGetSubElement'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetSubElement</span>
<span class='normal'>: Sub-element of a complex Element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> rsElementGetSubElement(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e, <a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> index);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to query.</td></tr>
<tr><th>index</th><td>Index of the sub-element to return.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Sub-element at the given index.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> For Elements that represents a structure, this function returns the sub-element at the
specified index.
</p>
<p> If the Element is not a structure or the index is greater or equal to the number of
sub-elements, an invalid handle is returned.
</p>
</div>
</div>
<a name='android_rs:rsElementGetSubElementArraySize'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetSubElementArraySize</span>
<span class='normal'>: Array size of a sub-element of a complex Element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetSubElementArraySize(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e, <a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> index);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to query.</td></tr>
<tr><th>index</th><td>Index of the sub-element.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Array size of the sub-element.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> For complex Elements, sub-elements can be statically sized arrays. This function
returns the array size of the sub-element at the index. This sub-element repetition
is different than fixed size vectors.
</p>
</div>
</div>
<a name='android_rs:rsElementGetSubElementCount'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetSubElementCount</span>
<span class='normal'>: Number of sub-elements</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetSubElementCount(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to get data from.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Number of sub-elements.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Elements can be simple, such as an int or a float, or a structure with multiple
sub-elements. This function returns zero for simple Elements and the number of
sub-elements for complex Elements.
</p>
</div>
</div>
<a name='android_rs:rsElementGetSubElementName'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetSubElementName</span>
<span class='normal'>: Name of a sub-element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetSubElementName(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e, <a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> index, char* name, <a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> nameLength);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to get data from.</td></tr>
<tr><th>index</th><td>Index of the sub-element.</td></tr>
<tr><th>name</th><td>Address of the array to store the name into.</td></tr>
<tr><th>nameLength</th><td>Length of the provided name array.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Number of characters copied, excluding the null terminator.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> For complex Elements, this function returns the name of the sub-element at the
specified index.
</p>
</div>
</div>
<a name='android_rs:rsElementGetSubElementNameLength'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetSubElementNameLength</span>
<span class='normal'>: Length of the name of a sub-element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetSubElementNameLength(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e, <a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> index);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to get data from.</td></tr>
<tr><th>index</th><td>Index of the sub-element.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Length of the sub-element name including the null terminator.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> For complex Elements, this function returns the length of the name of the sub-element
at the specified index.
</p>
</div>
</div>
<a name='android_rs:rsElementGetSubElementOffsetBytes'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetSubElementOffsetBytes</span>
<span class='normal'>: Offset of the instantiated sub-element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetSubElementOffsetBytes(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e, <a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> index);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to get data from.</td></tr>
<tr><th>index</th><td>Index of the sub-element.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Offset in bytes.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> This function returns the relative position of the instantiation of the specified
sub-element within the instantiation of the Element.
</p>
<p> For example, if the Element describes a 32 bit float followed by a 32 bit integer,
the offset return for the first will be 0 and the second 4.
</p>
</div>
</div>
<a name='android_rs:rsElementGetVectorSize'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsElementGetVectorSize</span>
<span class='normal'>: Vector size of the Element</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_value_types.html#android_rs:uint32_t'>uint32_t</a> rsElementGetVectorSize(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> e);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Parameters</h5>
<table class='jd-tagtable'><tbody>
<tr><th>e</th><td>Element to get data from.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata'> <h5 class='jd-tagtitle'>Returns</h5>
<table class='jd-tagtable'><tbody>
<tr><td>Length of the element vector.</td></tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns the Element's vector size. If the Element does not represent a vector,
1 is returned.
</p>
</div>
</div>
<a name='android_rs:rsGetAllocation'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsGetAllocation</span>
<span class='normal'>: Return the Allocation for a given pointer</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> rsGetAllocation(const void* p);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p><b>Deprecated.</b> This function is deprecated and will be removed from the SDK in a future release.</p>
<p> Returns the Allocation for a given pointer. The pointer should point within a valid
allocation. The results are undefined if the pointer is not from a valid Allocation.
</p>
</div>
</div>
<a name='android_rs:rsIsObject'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsIsObject</span>
<span class='normal'>: Check for an empty handle</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td>bool rsIsObject(<a href='rs_object_types.html#android_rs:rs_allocation'>rs_allocation</a> v);
</td>
<td> </td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_object_types.html#android_rs:rs_element'>rs_element</a> v);
</td>
<td> </td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_graphics.html#android_rs:rs_font'>rs_font</a> v);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_graphics.html#android_rs:rs_mesh'>rs_mesh</a> v);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_graphics.html#android_rs:rs_program_fragment'>rs_program_fragment</a> v);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_graphics.html#android_rs:rs_program_raster'>rs_program_raster</a> v);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_graphics.html#android_rs:rs_program_store'>rs_program_store</a> v);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_graphics.html#android_rs:rs_program_vertex'>rs_program_vertex</a> v);
</td>
<td> When compiling for 32 bits.
</td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a> v);
</td>
<td> </td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_object_types.html#android_rs:rs_script'>rs_script</a> v);
</td>
<td> </td>
</tr>
<tr>
<td>bool rsIsObject(<a href='rs_object_types.html#android_rs:rs_type'>rs_type</a> v);
</td>
<td> </td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Returns true if the handle contains a non-null reference.
</p>
<p> This function does not validate that the internal pointer used in the handle
points to an actual valid object; it only checks for null.
</p>
<p> This function can be used to check the Element returned by <a href='rs_object_info.html#android_rs:rsElementGetSubElement'>rsElementGetSubElement</a>()
or see if <a href='rs_object_info.html#android_rs:rsClearObject'>rsClearObject</a>() has been called on a handle.
</p>
</div>
</div>
<a name='android_rs:rsSamplerGetAnisotropy'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsSamplerGetAnisotropy</span>
<span class='normal'>: Anisotropy of the Sampler</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td>float rsSamplerGetAnisotropy(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a> s);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Get the Sampler's anisotropy.
</p>
<p> See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>.
</p>
</div>
</div>
<a name='android_rs:rsSamplerGetMagnification'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsSamplerGetMagnification</span>
<span class='normal'>: Sampler magnification value</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_sampler_value'>rs_sampler_value</a> rsSamplerGetMagnification(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a> s);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Get the Sampler's magnification value.
</p>
<p> See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>.
</p>
</div>
</div>
<a name='android_rs:rsSamplerGetMinification'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsSamplerGetMinification</span>
<span class='normal'>: Sampler minification value</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_sampler_value'>rs_sampler_value</a> rsSamplerGetMinification(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a> s);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Get the Sampler's minification value.
</p>
<p> See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>.
</p>
</div>
</div>
<a name='android_rs:rsSamplerGetWrapS'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsSamplerGetWrapS</span>
<span class='normal'>: Sampler wrap S value</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_sampler_value'>rs_sampler_value</a> rsSamplerGetWrapS(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a> s);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Get the Sampler's wrap S value.
</p>
<p> See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>.
</p>
</div>
</div>
<a name='android_rs:rsSamplerGetWrapT'></a>
<div class='jd-details'>
<h4 class='jd-details-title'>
<span class='sympad'>rsSamplerGetWrapT</span>
<span class='normal'>: Sampler wrap T value</span>
</h4>
<div class='jd-details-descr'>
<table class='jd-tagtable'><tbody>
<tr>
<td><a href='rs_object_types.html#android_rs:rs_sampler_value'>rs_sampler_value</a> rsSamplerGetWrapT(<a href='rs_object_types.html#android_rs:rs_sampler'>rs_sampler</a> s);
</td>
<td> Added in <a href='http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels'>API level 16</a>
</td>
</tr>
</tbody></table>
</div>
<div class='jd-tagdata jd-tagdescr'>
<p> Get the sampler's wrap T value.
</p>
<p> See <a href='http://developer.android.com/reference/android/renderscript/Sampler.html'>android.renderscript.S</a>.
</p>
</div>
</div>
</div>