RelativeRectangle

RelativeRectangle

Tổng quan

RelativeRectangle là một lớp trong Aspose.3D FOSS cho Python.

Hình chữ nhật tương đối

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.

Lớp này khai báo 2 phương thức cho các đối tượng RelativeRectangle trong các chương trình Python. Các phương thức khả dụng bao gồm: __init__, to_absolute. Tất cả các thành viên công khai đều có thể truy cập bởi bất kỳ ứng dụng Python nào sau khi cài đặt gói Aspose.3D FOSS cho Python. Thuộc tính: offset_height, offset_width, offset_x, offset_y, scale_height, scale_width, và 2 mục nữa.

Thuộc tính

TênKiểuTruy cậpMô tả
scale_xfloatĐọc/GhiLấy hoặc đặt tỷ lệ x.
scale_yfloatĐọc/GhiLấy hoặc đặt tỷ lệ y.
scale_widthfloatĐọc/GhiLấy hoặc đặt chiều rộng tỷ lệ.
scale_heightfloatĐọc/GhiLấy hoặc đặt chiều cao tỷ lệ.
offset_xintĐọc/GhiLấy hoặc đặt offset x.
offset_yintĐọc/GhiLấy hoặc đặt offset y.
offset_widthintĐọc/GhiLấy hoặc đặt chiều rộng offset.
offset_heightintĐọc/GhiLấy hoặc đặt chiều cao offset.

Phương thức

Chữ kýMô tả
__init__(left: int, top: int, width: int, height: int)Calls init(left, top, width, height) trên thực thể RelativeRectangle này.
to_absolute(left: int, top: int, width: int, height: int) → 'Rect'Chuyển đổi sang hình chữ nhật tuyệt đối bằng cách sử dụng các giá trị tham chiếu đã cho.

Xem thêm

 Tiếng Việt