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 项。

属性

名称类型访问描述
topfloat读取根据 CSSOM View 第 7.1 节,取 y 与 y + height 的最小值。
rightfloat读取根据 CSSOM View 第 7.1 节,取 x 与 x + width 的最大值。
bottomfloat读取每个 CSSOM View(第 7.1 节)中的 y 与 y + height 的最大值。
leftfloat读取每个 CSSOM View(第 7.1 节)中的 x 与 x + width 的最小值。
xfloat读取获取 x。
yfloat读取获取 y。
widthfloat读取获取宽度。
heightfloat读取获取高度。

方法

签名描述
__init__(x: float, y: float, width: float, height: float)Calls init此 DOMRect 实例上的 (x, y, width, height)。

另请参阅

 中文