RelativeRectangle class
RelativeRectangle class
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.
The RelativeRectangle type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
__init__(self, left, top, width, height) | Construct a RelativeRectangle |
__init__(self) | Constructs a new instance of RelativeRectangle |
Properties
| Property | Description |
|---|---|
| scale_x | Relative coordinate X |
| scale_y | Relative coordinate Y |
| scale_width | Relative width |
| scale_height | Relative height |
| offset_x | Gets or sets the offset for coordinate X |
| offset_y | Gets or sets the offset for coordinate Y |
| offset_width | Gets or sets the offset for width |
| offset_height | Gets or sets the offset for height |
Methods
| Method | Description |
|---|---|
to_absolute(self, left, top, width, height) | Convert the relative rectangle to absolute rectangle |
from_scale(, scale_x, scale_y, scale_width, scale_height) | Construct a RelativeRectangle with all offset fields zero and scale fields from given parameters. |
See Also
- module
aspose.threed.utilities - class
RelativeRectangle