Condividi tramite


Allocation.CopyFrom Method

Definition

Overloads

CopyFrom(Int16[])

Copy into this Allocation from an array.

CopyFrom(Single[])

Copy into this Allocation from an array.

CopyFrom(Byte[])

Copy into this Allocation from an array.

CopyFrom(Int32[])

Copy into this Allocation from an array.

CopyFrom(BaseObj[])

Copy an array of RS objects to the Allocation.

CopyFrom(Allocation)

Copy an Allocation from an Allocation.

CopyFrom(Object)

Copy into this Allocation from an array.

CopyFrom(Bitmap)

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

CopyFrom(Int16[])

Copy into this Allocation from an array.

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

Parameters

d
Int16[]

the source array

Attributes

Remarks

Copy into this Allocation from an 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 must 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.copyFrom(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

CopyFrom(Single[])

Copy into this Allocation from an array.

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

Parameters

d
Single[]

the source array

Attributes

Remarks

Copy into this Allocation from an 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 must 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.copyFrom(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

CopyFrom(Byte[])

Copy into this Allocation from an array.

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

Parameters

d
Byte[]

the source array

Attributes

Remarks

Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's android.renderscript.Element is not 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 must 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.copyFrom(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

CopyFrom(Int32[])

Copy into this Allocation from an array.

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

Parameters

d
Int32[]

the source array

Attributes

Remarks

Copy into this Allocation from an 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 must 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.copyFrom(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

CopyFrom(BaseObj[])

Copy an array of RS objects to the Allocation.

[Android.Runtime.Register("copyFrom", "([Landroid/renderscript/BaseObj;)V", "GetCopyFrom_arrayLandroid_renderscript_BaseObj_Handler")]
public virtual void CopyFrom (Android.Renderscripts.BaseObj[]? d);
[<Android.Runtime.Register("copyFrom", "([Landroid/renderscript/BaseObj;)V", "GetCopyFrom_arrayLandroid_renderscript_BaseObj_Handler")>]
abstract member CopyFrom : Android.Renderscripts.BaseObj[] -> unit
override this.CopyFrom : Android.Renderscripts.BaseObj[] -> unit

Parameters

d
BaseObj[]

Source array.

Attributes

Remarks

Copy an array of RS objects to the Allocation.

Java documentation for android.renderscript.Allocation.copyFrom(android.renderscript.BaseObj[]).

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

CopyFrom(Allocation)

Copy an Allocation from an Allocation.

[Android.Runtime.Register("copyFrom", "(Landroid/renderscript/Allocation;)V", "GetCopyFrom_Landroid_renderscript_Allocation_Handler")]
public virtual void CopyFrom (Android.Renderscripts.Allocation? a);
[<Android.Runtime.Register("copyFrom", "(Landroid/renderscript/Allocation;)V", "GetCopyFrom_Landroid_renderscript_Allocation_Handler")>]
abstract member CopyFrom : Android.Renderscripts.Allocation -> unit
override this.CopyFrom : Android.Renderscripts.Allocation -> unit

Parameters

a
Allocation

the source allocation

Attributes

Remarks

Copy an Allocation from an Allocation. The types of both allocations must be identical.

Java documentation for android.renderscript.Allocation.copyFrom(android.renderscript.Allocation).

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

CopyFrom(Object)

Copy into this Allocation from an array.

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

Parameters

array
Object

The source array

Attributes

Remarks

Copy into this Allocation from an array. This variant is type checked and will generate exceptions if the Allocation's android.renderscript.Element does not match the array's primitive 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 must 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.copyFrom(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

CopyFrom(Bitmap)

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

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

Parameters

b
Bitmap

the source bitmap

Attributes

Remarks

Copy into an Allocation from a android.graphics.Bitmap. The height, width, and format of the bitmap must match the existing allocation.

If the android.graphics.Bitmap is the same as the android.graphics.Bitmap used to create the Allocation with #createFromBitmap and #USAGE_SHARED is set on the Allocation, this will synchronize the Allocation with the latest data from the android.graphics.Bitmap, potentially avoiding the actual copy.

Java documentation for android.renderscript.Allocation.copyFrom(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