RelativeRectangle
Przegląd
RelativeRectangle jest klasą w Aspose.3D FOSS dla Python.
Prostokąt względny
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.Ta klasa deklaruje 2 metody dla obiektów RelativeRectangle w programach Python. Dostępne metody to: __init__, to_absolute. Wszystkie publiczne elementy są dostępne dla każdej aplikacji Python po zainstalowaniu pakietu Aspose.3D FOSS dla Python. Właściwości: offset_height, offset_width, offset_x, offset_y, scale_height, scale_width oraz 2 dodatkowe.
Właściwości
| Nazwa | Typ | Dostęp | Opis |
|---|---|---|---|
scale_x | float | Odczyt/zapis | Pobiera lub ustawia skalę x. |
scale_y | float | Odczyt/zapis | Pobiera lub ustawia skalę y. |
scale_width | float | Odczyt/zapis | Pobiera lub ustawia szerokość skali. |
scale_height | float | Odczyt/zapis | Pobiera lub ustawia wysokość skali. |
offset_x | int | Odczyt/zapis | Pobiera lub ustawia offset x. |
offset_y | int | Odczyt/zapis | Pobiera lub ustawia offset y. |
offset_width | int | Odczyt/zapis | Pobiera lub ustawia szerokość offsetu. |
offset_height | int | Odczyt/zapis | Pobiera lub ustawia wysokość offsetu. |
Metody
| Sygnatura | Opis |
|---|---|
__init__(left: int, top: int, width: int, height: int) | Calls init(lewy, górny, szerokość, wysokość) w tej instancji RelativeRectangle. |
to_absolute(left: int, top: int, width: int, height: int) → 'Rect' | Konwertuj do prostokąta bezwzględnego przy użyciu podanych wartości odniesienia |