语言

Drawable.SetBounds(Int32, Int32, Int32, Int32) 方法

定义

为绘图对象指定边界矩形。

[Android.Runtime.Register("setBounds", "(IIII)V", "GetSetBounds_IIIIHandler")]
public virtual void SetBounds(int left, int top, int right, int bottom);
[<Android.Runtime.Register("setBounds", "(IIII)V", "GetSetBounds_IIIIHandler")>]
abstract member SetBounds : int * int * int * int -> unit
override this.SetBounds : int * int * int * int -> unit

参数

left
Int32

边界的左边缘。

top
Int32

边界的上边缘。

right
Int32

边界的右边缘。

bottom
Int32

边界的下边缘。

特性

注解

为绘图对象指定边界矩形。 这是调用其 draw() 方法时可绘制的可绘制位置。

Java文档android.graphics.drawable.Drawable.setBounds(int, int, int, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于