Udostępnij za pośrednictwem


Allocation.CreateFromBitmapResource Method

Definition

Overloads

CreateFromBitmapResource(RenderScript, Resources, Int32)

Creates a non-mipmapped Allocation to use as a graphics texture from the android.graphics.Bitmap referenced by resource ID.

CreateFromBitmapResource(RenderScript, Resources, Int32, Allocation+MipmapControl, AllocationUsage)

Creates a non-mipmapped Allocation to use as a graphics texture from the android.graphics.Bitmap referenced by resource ID.

CreateFromBitmapResource(RenderScript, Resources, Int32)

Creates a non-mipmapped Allocation to use as a graphics texture from the android.graphics.Bitmap referenced by resource ID.

[Android.Runtime.Register("createFromBitmapResource", "(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;I)Landroid/renderscript/Allocation;", "")]
public static Android.Renderscripts.Allocation? CreateFromBitmapResource (Android.Renderscripts.RenderScript? rs, Android.Content.Res.Resources? res, int id);
[<Android.Runtime.Register("createFromBitmapResource", "(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;I)Landroid/renderscript/Allocation;", "")>]
static member CreateFromBitmapResource : Android.Renderscripts.RenderScript * Android.Content.Res.Resources * int -> Android.Renderscripts.Allocation

Parameters

rs
RenderScript

Context to which the allocation will belong.

res
Resources

application resources

id
Int32

resource id to load the data from

Returns

Allocation containing resource data

Attributes

Remarks

Creates a non-mipmapped Allocation to use as a graphics texture from the android.graphics.Bitmap referenced by resource ID.

With target API version 18 or greater, this allocation will be created with #USAGE_SCRIPT and #USAGE_GRAPHICS_TEXTURE. With target API version 17 or lower, this allocation will be created with #USAGE_GRAPHICS_TEXTURE.

Java documentation for android.renderscript.Allocation.createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, 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

CreateFromBitmapResource(RenderScript, Resources, Int32, Allocation+MipmapControl, AllocationUsage)

Creates a non-mipmapped Allocation to use as a graphics texture from the android.graphics.Bitmap referenced by resource ID.

[Android.Runtime.Register("createFromBitmapResource", "(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;ILandroid/renderscript/Allocation$MipmapControl;I)Landroid/renderscript/Allocation;", "")]
public static Android.Renderscripts.Allocation? CreateFromBitmapResource (Android.Renderscripts.RenderScript? rs, Android.Content.Res.Resources? res, int id, Android.Renderscripts.Allocation.MipmapControl? mips, Android.Renderscripts.AllocationUsage usage);
[<Android.Runtime.Register("createFromBitmapResource", "(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;ILandroid/renderscript/Allocation$MipmapControl;I)Landroid/renderscript/Allocation;", "")>]
static member CreateFromBitmapResource : Android.Renderscripts.RenderScript * Android.Content.Res.Resources * int * Android.Renderscripts.Allocation.MipmapControl * Android.Renderscripts.AllocationUsage -> Android.Renderscripts.Allocation

Parameters

rs
RenderScript

Context to which the allocation will belong.

res
Resources

application resources

id
Int32

resource id to load the data from

mips
Allocation.MipmapControl

specifies desired mipmap behaviour for the allocation

usage
AllocationUsage

bit field specifying how the allocation is utilized

Returns

Allocation containing resource data

Attributes

Remarks

Java documentation for android.renderscript.Allocation.createFromBitmapResource(android.renderscript.RenderScript, android.content.res.Resources, 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