RelativeRectangle
概述
RelativeRectangle 是 Aspose.3D FOSS 中用于 Python 的类。
相对矩形
The formula between relative component to absolute value is:
Scale * (Reference Width) + offset
So if we want it to represent an absolute value, leave all scale fields zero, and use offset fields instead.此类在 Python 程序中为 RelativeRectangle 对象声明了 2 个方法。可用的方法包括:__init__、to_absolute。在安装 Aspose.3D FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性包括:offset_height、offset_width、offset_x、offset_y、scale_height、scale_width,以及另外 2 个。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
scale_x | float | 读写 | 获取或设置 scale x。 |
scale_y | float | 读写 | 获取或设置 y 方向的缩放。 |
scale_width | float | 读写 | 获取或设置比例宽度。 |
scale_height | float | 读写 | 获取或设置比例高度。 |
offset_x | int | 读写 | 获取或设置偏移量 x。 |
offset_y | int | 读写 | 获取或设置偏移量 y。 |
offset_width | int | 读写 | 获取或设置偏移宽度。 |
offset_height | int | 读写 | 获取或设置偏移高度。 |
方法
| 签名 | 描述 |
|---|---|
__init__(left: int, top: int, width: int, height: int) | Calls init(left, top, width, height) 在此 RelativeRectangle 实例上。 |
to_absolute(left: int, top: int, width: int, height: int) → 'Rect' | 使用给定的参考值转换为绝对矩形。 |