Share via


Allocation.CopyTo Method

Definition

Overloads

CopyTo(Single[])

Copy from the Allocation into a float array.

CopyTo(Int32[])

Copy from the Allocation into a int array.

CopyTo(Int16[])

Copy from the Allocation into a short array.

CopyTo(Byte[])

Copy from the Allocation into a byte array.

CopyTo(Object)

Copy from the Allocation into an array.

CopyTo(Bitmap)

Copy from the Allocation into a android.graphics.Bitmap.

CopyTo(Single[])

Copy from the Allocation into a float array.

[Android.Runtime.Register("copyTo", "([F)V", "GetCopyTo_arrayFHandler")]
public virtual void CopyTo (float[]? d);
[<Android.Runtime.Register("copyTo", "([F)V", "GetCopyTo_arrayFHandler")>]
abstract member CopyTo : single[] -> unit
override this.CopyTo : single[] -> unit

Parameters

d
Single[]

The array to be set from the Allocation.

Attributes

Remarks

Copy from the Allocation into a float array. This variant is type checked and will generate exceptions if the Allocation's android.renderscript.Element is neither a 32 bit float nor a vector of 32 bit floats android.renderscript.Element.DataType.

If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize().

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is disabled, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells will be part of the array.

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells must not be part of the array.

Java documentation for android.renderscript.Allocation.copyTo(float[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CopyTo(Int32[])

Copy from the Allocation into a int array.

[Android.Runtime.Register("copyTo", "([I)V", "GetCopyTo_arrayIHandler")]
public virtual void CopyTo (int[]? d);
[<Android.Runtime.Register("copyTo", "([I)V", "GetCopyTo_arrayIHandler")>]
abstract member CopyTo : int[] -> unit
override this.CopyTo : int[] -> unit

Parameters

d
Int32[]

The array to be set from the Allocation.

Attributes

Remarks

Copy from the Allocation into a int array. This variant is type checked and will generate exceptions if the Allocation's android.renderscript.Element is not a 32 bit integer nor a vector of 32 bit integers android.renderscript.Element.DataType.

If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize().

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is disabled, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells will be part of the array.

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells must not be part of the array.

Java documentation for android.renderscript.Allocation.copyTo(int[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CopyTo(Int16[])

Copy from the Allocation into a short array.

[Android.Runtime.Register("copyTo", "([S)V", "GetCopyTo_arraySHandler")]
public virtual void CopyTo (short[]? d);
[<Android.Runtime.Register("copyTo", "([S)V", "GetCopyTo_arraySHandler")>]
abstract member CopyTo : int16[] -> unit
override this.CopyTo : int16[] -> unit

Parameters

d
Int16[]

The array to be set from the Allocation.

Attributes

Remarks

Copy from the Allocation into a short array. This variant is type checked and will generate exceptions if the Allocation's android.renderscript.Element is not a 16 bit integer nor a vector of 16 bit integers android.renderscript.Element.DataType.

If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize().

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is disabled, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells will be part of the array.

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells must not be part of the array.

Java documentation for android.renderscript.Allocation.copyTo(short[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CopyTo(Byte[])

Copy from the Allocation into a byte array.

[Android.Runtime.Register("copyTo", "([B)V", "GetCopyTo_arrayBHandler")]
public virtual void CopyTo (byte[]? d);
[<Android.Runtime.Register("copyTo", "([B)V", "GetCopyTo_arrayBHandler")>]
abstract member CopyTo : byte[] -> unit
override this.CopyTo : byte[] -> unit

Parameters

d
Byte[]

The array to be set from the Allocation.

Attributes

Remarks

Copy from the Allocation into a byte array. This variant is type checked and will generate exceptions if the Allocation's android.renderscript.Element is neither an 8 bit integer nor a vector of 8 bit integers android.renderscript.Element.DataType.

If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize().

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is disabled, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells will be part of the array.

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells must not be part of the array.

Java documentation for android.renderscript.Allocation.copyTo(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CopyTo(Object)

Copy from the Allocation into an array.

[Android.Runtime.Register("copyTo", "(Ljava/lang/Object;)V", "GetCopyTo_Ljava_lang_Object_Handler")]
public virtual void CopyTo (Java.Lang.Object? array);
[<Android.Runtime.Register("copyTo", "(Ljava/lang/Object;)V", "GetCopyTo_Ljava_lang_Object_Handler")>]
abstract member CopyTo : Java.Lang.Object -> unit
override this.CopyTo : Java.Lang.Object -> unit

Parameters

array
Object

The array to be set from the Allocation.

Attributes

Remarks

Copy from the Allocation into an array. The method is type checked and will generate exceptions if the Allocation's android.renderscript.Element does not match the input data type.

If the Allocation does not have Vec3 Elements, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize().

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is disabled, then the size of the array in bytes must be at least the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells will be part of the array.

If the Allocation has Vec3 Elements and #setAutoPadding AutoPadding is enabled, then the size of the array in bytes must be at least 3/4 the size of the Allocation #getBytesSize getBytesSize(). The padding bytes for the cells must not be part of the array.

Java documentation for android.renderscript.Allocation.copyTo(java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

CopyTo(Bitmap)

Copy from the Allocation into a android.graphics.Bitmap.

[Android.Runtime.Register("copyTo", "(Landroid/graphics/Bitmap;)V", "GetCopyTo_Landroid_graphics_Bitmap_Handler")]
public virtual void CopyTo (Android.Graphics.Bitmap? b);
[<Android.Runtime.Register("copyTo", "(Landroid/graphics/Bitmap;)V", "GetCopyTo_Landroid_graphics_Bitmap_Handler")>]
abstract member CopyTo : Android.Graphics.Bitmap -> unit
override this.CopyTo : Android.Graphics.Bitmap -> unit

Parameters

b
Bitmap

The bitmap to be set from the Allocation.

Attributes

Remarks

Copy from the Allocation into a android.graphics.Bitmap. The bitmap must match the dimensions of the Allocation.

Java documentation for android.renderscript.Allocation.copyTo(android.graphics.Bitmap).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to