.. default-domain:: py .. highlight:: py .. currentmodule:: UI Rect Transform ============== .. class:: RectTransform A Unity engine Rect Transform for a UI object. See the `Unity manual `_ for more details. .. attribute:: position Position of the rectangles pivot point relative to the anchors. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: local_position Position of the rectangles pivot point relative to the anchors. :Attribute: Can be read or written :rtype: tuple(float, float, float) .. attribute:: size Width and height of the rectangle. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: upper_right Position of the rectangles upper right corner relative to the anchors. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: lower_left Position of the rectangles lower left corner relative to the anchors. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: anchor Set the minimum and maximum anchor points as a fraction of the size of the parent rectangle. :Attribute: Write-only, cannot be read :rtype: tuple(float, float) .. attribute:: anchor_max The anchor point for the lower left corner of the rectangle defined as a fraction of the size of the parent rectangle. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: anchor_min The anchor point for the upper right corner of the rectangle defined as a fraction of the size of the parent rectangle. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: pivot Location of the pivot point around which the rectangle rotates, defined as a fraction of the size of the rectangle itself. :Attribute: Can be read or written :rtype: tuple(float, float) .. attribute:: rotation Rotation, as a quaternion, of the object around its pivot point. :Attribute: Can be read or written :rtype: tuple(float, float, float, float) .. attribute:: scale Scale factor applied to the object in the x, y and z dimensions. :Attribute: Can be read or written :rtype: tuple(float, float, float)