RelativeRectangle
Overview
RelativeRectangle is a class in Aspose.3D FOSS for Python.
Relative rectangle
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.
This class declares 2 methods for RelativeRectangle objects in Python programs.
Available methods include: __init__, to_absolute.
All public members are accessible to any Python application after installing the Aspose.3D FOSS for Python package.
Properties: offset_height, offset_width, offset_x, offset_y, scale_height, scale_width, and 2 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
scale_x | float | Read/Write | Gets or sets the scale x. |
scale_y | float | Read/Write | Gets or sets the scale y. |
scale_width | float | Read/Write | Gets or sets the scale width. |
scale_height | float | Read/Write | Gets or sets the scale height. |
offset_x | int | Read/Write | Gets or sets the offset x. |
offset_y | int | Read/Write | Gets or sets the offset y. |
offset_width | int | Read/Write | Gets or sets the offset width. |
offset_height | int | Read/Write | Gets or sets the offset height. |
Methods
| Signature | Description |
|---|---|
__init__(left: int, top: int, width: int, height: int) | Calls init(left, top, width, height) on this RelativeRectangle instance. |
to_absolute(left: int, top: int, width: int, height: int) → 'Rect' | Convert to absolute rectangle using the given reference values |