DOMRect
DOMRect
概述
DOMRect 是 Aspose.Html FOSS 中用于 Python 的类。
轴对齐的边界矩形(CSSOM View 第 7.1 节)。
此类提供 1 个用于在 Python 程序中处理 DOMRect 对象的方法。可用的方法包括:__init__。在安装 Aspose.Html FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:bottom、height、left、right、top、width,以及另外 2 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
top | float | 读取 | 根据 CSSOM View 第 7.1 节,取 y 与 y + height 的最小值。 |
right | float | 读取 | 根据 CSSOM View 第 7.1 节,取 x 与 x + width 的最大值。 |
bottom | float | 读取 | 每个 CSSOM View(第 7.1 节)中的 y 与 y + height 的最大值。 |
left | float | 读取 | 每个 CSSOM View(第 7.1 节)中的 x 与 x + width 的最小值。 |
x | float | 读取 | 获取 x。 |
y | float | 读取 | 获取 y。 |
width | float | 读取 | 获取宽度。 |
height | float | 读取 | 获取高度。 |
方法
| 签名 | 描述 |
|---|---|
__init__(x: float, y: float, width: float, height: float) | Calls init此 DOMRect 实例上的 (x, y, width, height)。 |