Rect
概述
Rect 是 Aspose.3D FOSS 中用于 Python 的一个类。
用于表示矩形的类
此类为 Python 程序中的 Rect 对象声明了 2 个方法。可用的方法包括:__init__、contains。在安装了 Aspose.3D FOSS for Python 包之后,所有公共成员对任何 Python 应用程序均可访问。属性:bottom、height、left、right、top、width,以及另外 2 个。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
width | int | 读写 | 获取或设置宽度。 |
height | int | 读写 | 获取或设置高度。 |
x | int | 读写 | 获取或设置 x。 |
y | int | 读写 | 获取或设置 y。 |
left | int | 读取 | 获取左侧。 |
right | int | 读取 | 获取右侧。 |
top | int | 读取 | 获取顶部。 |
bottom | int | 读取 | 获取底部。 |
方法
| 签名 | 描述 |
|---|---|
__init__(x: int, y: int, width: int, height: int) | Calls init(x, y, width, height) 在此 Rect 实例上。 |
contains(x: int, y: int) → bool | 如果指定的点位于矩形的边界内,则返回 True。 |