RelativeRectangle

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

NameTypeAccessDescription
scale_xfloatRead/WriteGets or sets the scale x.
scale_yfloatRead/WriteGets or sets the scale y.
scale_widthfloatRead/WriteGets or sets the scale width.
scale_heightfloatRead/WriteGets or sets the scale height.
offset_xintRead/WriteGets or sets the offset x.
offset_yintRead/WriteGets or sets the offset y.
offset_widthintRead/WriteGets or sets the offset width.
offset_heightintRead/WriteGets or sets the offset height.

Methods

SignatureDescription
__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

See Also