Share via


Drawable.CopyBounds Method

Definition

Overloads

CopyBounds()

Return a copy of the drawable's bounds in a new Rect.

CopyBounds(Rect)

Return a copy of the drawable's bounds in the specified Rect (allocated by the caller).

CopyBounds()

Return a copy of the drawable's bounds in a new Rect.

[Android.Runtime.Register("copyBounds", "()Landroid/graphics/Rect;", "")]
public Android.Graphics.Rect CopyBounds ();
[<Android.Runtime.Register("copyBounds", "()Landroid/graphics/Rect;", "")>]
member this.CopyBounds : unit -> Android.Graphics.Rect

Returns

A copy of the drawable's bounds

Attributes

Remarks

Return a copy of the drawable's bounds in a new Rect. This returns the same values as getBounds(), but the returned object is guaranteed to not be changed later by the drawable (i.e. it retains no reference to this rect). If the caller already has a Rect allocated, call copyBounds(rect).

Java documentation for android.graphics.drawable.Drawable.copyBounds().

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

CopyBounds(Rect)

Return a copy of the drawable's bounds in the specified Rect (allocated by the caller).

[Android.Runtime.Register("copyBounds", "(Landroid/graphics/Rect;)V", "")]
public void CopyBounds (Android.Graphics.Rect bounds);
[<Android.Runtime.Register("copyBounds", "(Landroid/graphics/Rect;)V", "")>]
member this.CopyBounds : Android.Graphics.Rect -> unit

Parameters

bounds
Rect

Rect to receive the drawable's bounds (allocated by the caller).

Attributes

Remarks

Return a copy of the drawable's bounds in the specified Rect (allocated by the caller). The bounds specify where this will draw when its draw() method is called.

Java documentation for android.graphics.drawable.Drawable.copyBounds(android.graphics.Rect).

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