RelativeRectangle

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_xfloat读写获取或设置 scale x。
scale_yfloat读写获取或设置 y 方向的缩放。
scale_widthfloat读写获取或设置比例宽度。
scale_heightfloat读写获取或设置比例高度。
offset_xint读写获取或设置偏移量 x。
offset_yint读写获取或设置偏移量 y。
offset_widthint读写获取或设置偏移宽度。
offset_heightint读写获取或设置偏移高度。

方法

签名描述
__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'使用给定的参考值转换为绝对矩形。

另请参阅

 中文